forked from DGNum/liminix
00aeb81811
this is step 1 of min-collect-garbage, no point implementing deletion ourselves when rm -r exists (arguably no point in implementing any of it, but this is the bit we can't do efficiently in bourne shell - it means we're reading the store-paths list once instead of grepping it afresh for every entry in /nix/store/)
20 lines
395 B
Nix
20 lines
395 B
Nix
{
|
|
stdenv
|
|
, nix
|
|
, cpio
|
|
, openssh
|
|
}: stdenv.mkDerivation {
|
|
name = "min-copy-closure";
|
|
buildInputs = [ ];
|
|
propagatedBuildInputs = [ cpio openssh nix ];
|
|
src = ./.;
|
|
makeFlags = [ "min-list-garbage" ];
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
for i in min-copy-closure liminix-rebuild; do
|
|
echo $i
|
|
cp ''${i}.sh $out/bin/$i
|
|
done
|
|
cp min-list-garbage $out/bin
|
|
'';
|
|
}
|