From a649086767928e5c3f3f10c552d6baf951c08e50 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 13 Apr 2018 12:25:38 +0200 Subject: Refine rebuild-system --- nix/rebuild-system.nix | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'nix/rebuild-system.nix') 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 @@ { stdenv , fetchgit , makeWrapper -, git +, zsh, git }: stdenv.mkDerivation rec { - inherit git; name = "rebuild-system-${version}"; - version = "0.1"; + version = "0.2"; src = ../rebuild-system; + buildInputs = [ makeWrapper ]; - phases = ["installPhase"]; + + phases = [ "buildPhase" "installPhase" ]; + + inherit zsh git; + + buildPhase = '' + substituteAll $src rebuild-system + ''; + installPhase = '' mkdir -p $out/bin - cp $src $out/bin/rebuild-system - chmod +x $out/bin/rebuild-system - wrapProgram $out/bin/rebuild-system \ - --prefix PATH : /var/setuid-wrappers \ - --prefix PATH : ${git}/bin + + install -m 755 -t $out/bin \ + rebuild-system ''; } -- cgit v1.2.3