summaryrefslogtreecommitdiff
path: root/nix/rebuild-system.nix
blob: ea19a6b8dbbaccf91713e2f7ae54bd948a538861 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ 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 : ${git}/bin
  '';
}