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

let
  #redo = haskellPackages.callPackage ./redo.nix {};
  redo = stdenv.lib.overrideDerivation (haskellngPackages.redo) (attrs: {
    patches = attrs.patches ++ [./redo.patch];
  });
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"
  '';
}