summaryrefslogtreecommitdiff
path: root/nix/rebuild-system.nix
blob: 058274b2aa8387b3b36fd056bb995f94c5fafda2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ stdenv
, zsh, git
}:

stdenv.mkDerivation rec {
  name = "rebuild-system-${version}";
  version = "0.2";
  src = ../rebuild-system;

  phases = [ "buildPhase" "installPhase" ];

  inherit zsh git;

  buildPhase = ''
    substituteAll $src rebuild-system
  '';
  
  installPhase = ''
    mkdir -p $out/bin

    install -m 755 -t $out/bin \
      rebuild-system
  '';
}