summaryrefslogtreecommitdiff
path: root/nix/rebuild-system.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/rebuild-system.nix')
-rw-r--r--nix/rebuild-system.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nix/rebuild-system.nix b/nix/rebuild-system.nix
new file mode 100644
index 0000000..b787392
--- /dev/null
+++ b/nix/rebuild-system.nix
@@ -0,0 +1,28 @@
1{ stdenv
2, fetchgit
3, makeWrapper
4, sudo
5, git
6}:
7
8stdenv.mkDerivation rec {
9 inherit sudo git;
10 name = "rebuild-system-${version}";
11 version = "0.1";
12 src = fetchgit {
13 inherit name;
14 url = git://git.yggdrasil.li/utils;
15 rev = "";
16 sha256 = "";
17 };
18 buildInputs = [ makeWrapper ];
19 buildPhase = "true";
20 installPhase = ''
21 mkdir -p $out/bin
22 cp $src/rebuild-system $out/bin/
23 chmod +x $out/bin/rebuild-system
24 wrapProgram $out/bin/rebuild-system \
25 --prefix PATH : ${sudo}/bin \
26 --prefix PATH : ${git}/bin
27 '';
28}