summaryrefslogtreecommitdiff
path: root/nix/rebuild-system.nix
blob: 9e8f60213de19b87e51e49d743cdc5d215aa65a9 (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
25
26
27
28
{ stdenv
, fetchgit
, makeWrapper
, zsh, git
}:

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

  buildInputs = [ makeWrapper ];

  phases = [ "buildPhase" "installPhase" ];

  inherit zsh git;

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

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