{ stdenv , fetchgit , makeWrapper , sudo , git }: stdenv.mkDerivation rec { inherit sudo git; name = "rebuild-system-${version}"; version = "0.1"; src = fetchgit { inherit name; url = git://git.yggdrasil.li/utils; rev = "885af08edef3eede81101d4303e3a025dc078449"; sha256 = "e4a1e4c6661a5c8f071b22251fda15bac86051d19d6c5ce60fbcd87dad8386e4"; }; buildInputs = [ makeWrapper ]; buildPhase = "true"; installPhase = '' mkdir -p $out/bin cp $src/rebuild-system $out/bin/ chmod +x $out/bin/rebuild-system wrapProgram $out/bin/rebuild-system \ --prefix PATH : /var/setuid-wrappers \ --prefix PATH : ${git}/bin ''; }