{ stdenv , fetchgit , makeWrapper , git }: stdenv.mkDerivation rec { inherit git; name = "rebuild-system-${version}"; version = "0.1"; src = ../rebuild-system; buildInputs = [ makeWrapper ]; phases = ["installPhase"]; 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 ''; }