2021-02-17 14:04:46 +01:00
|
|
|
{ stdenv, findutils, jq }:
|
2021-02-14 23:40:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "nixredo-1";
|
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
|
|
|
jq = "${jq}/bin/jq";
|
|
|
|
buildernix = ./builder.nix;
|
2021-02-16 20:32:15 +01:00
|
|
|
libnix = ./lib.nix;
|
|
|
|
|
2021-02-17 10:44:08 +01:00
|
|
|
files = [ ./nixredo ./nixredo-deps ./nixredo-whichdo ./nixredo-gc ];
|
2021-02-17 14:04:46 +01:00
|
|
|
find = "${findutils}/bin/find";
|
2021-02-14 23:40:26 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2021-02-16 20:32:15 +01:00
|
|
|
for f in $files; do
|
2021-02-16 13:17:01 +01:00
|
|
|
_f=$out/bin/nixredo''${f##*-nixredo}
|
|
|
|
cp $f $_f
|
|
|
|
substituteAllInPlace $_f
|
|
|
|
chmod +x $_f
|
|
|
|
done
|
2021-02-14 23:40:26 +01:00
|
|
|
'';
|
|
|
|
}
|