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.nix24
1 files changed, 15 insertions, 9 deletions
diff --git a/nix/rebuild-system.nix b/nix/rebuild-system.nix
index 5c65e88..9e8f602 100644
--- a/nix/rebuild-system.nix
+++ b/nix/rebuild-system.nix
@@ -1,22 +1,28 @@
1{ stdenv 1{ stdenv
2, fetchgit 2, fetchgit
3, makeWrapper 3, makeWrapper
4, git 4, zsh, git
5}: 5}:
6 6
7stdenv.mkDerivation rec { 7stdenv.mkDerivation rec {
8 inherit git;
9 name = "rebuild-system-${version}"; 8 name = "rebuild-system-${version}";
10 version = "0.1"; 9 version = "0.2";
11 src = ../rebuild-system; 10 src = ../rebuild-system;
11
12 buildInputs = [ makeWrapper ]; 12 buildInputs = [ makeWrapper ];
13 phases = ["installPhase"]; 13
14 phases = [ "buildPhase" "installPhase" ];
15
16 inherit zsh git;
17
18 buildPhase = ''
19 substituteAll $src rebuild-system
20 '';
21
14 installPhase = '' 22 installPhase = ''
15 mkdir -p $out/bin 23 mkdir -p $out/bin
16 cp $src $out/bin/rebuild-system 24
17 chmod +x $out/bin/rebuild-system 25 install -m 755 -t $out/bin \
18 wrapProgram $out/bin/rebuild-system \ 26 rebuild-system
19 --prefix PATH : /var/setuid-wrappers \
20 --prefix PATH : ${git}/bin
21 ''; 27 '';
22} 28}