summaryrefslogtreecommitdiff
path: root/custom/redo-wrapper.nix
blob: 20e1675ad58ba899e0c5a5f134f853720880ce38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ stdenv, makeWrapper, haskellPackages }:

let
  redo = haskellPackages.callPackage ./redo.nix {};
in stdenv.mkDerivation {
  name = "redo-wrapper";

  nativeBuildInputs = [ makeWrapper ];

  buildCommand = ''
    mkdir -p $out/bin
    ln -s $out/bin/redo $out/bin/redo-ifchange
    makeWrapper ${redo}/bin/redo $out/bin/redo \
      --set REDO_PATH "$out/bin"
  '';
}