2021-02-19 20:06:28 +01:00
|
|
|
{ stdenv, lib, findutils, jq, nixUnstable, coreutils }:
|
2021-02-14 23:40:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-02-19 20:06:28 +01:00
|
|
|
pname = "nixredo";
|
|
|
|
version = "1";
|
2021-02-14 23:40:26 +01:00
|
|
|
phases = [ "installPhase" "fixupPhase" ];
|
2021-02-19 20:06:28 +01:00
|
|
|
|
|
|
|
binPath = lib.makeBinPath [ findutils coreutils jq nixUnstable ];
|
2021-02-14 23:40:26 +01:00
|
|
|
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-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
|
|
|
'';
|
|
|
|
}
|