summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-13 12:25:38 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-13 12:25:38 +0200
commita649086767928e5c3f3f10c552d6baf951c08e50 (patch)
treea6e6af660b67b6bdd9c735cc2b4c747ef68def38 /nix
parent6b443335b97cc2d6479595313e5a19d2f49c6b7a (diff)
downloadutils-a649086767928e5c3f3f10c552d6baf951c08e50.tar
utils-a649086767928e5c3f3f10c552d6baf951c08e50.tar.gz
utils-a649086767928e5c3f3f10c552d6baf951c08e50.tar.bz2
utils-a649086767928e5c3f3f10c552d6baf951c08e50.tar.xz
utils-a649086767928e5c3f3f10c552d6baf951c08e50.zip
Refine rebuild-system
Diffstat (limited to '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}