nix-bundle/makedir.nix
Matthew Bauer 97dd6220f8 Pull sources into repo.
nix-user-chroot now uses local version instead of lethalman's
2016-06-15 16:23:19 +00:00

18 lines
475 B
Nix

{ stdenv, perl, pathsFromGraph }:
{ name, toplevel }:
stdenv.mkDerivation {
inherit toplevel name;
exportReferencesGraph = [ "closure" toplevel ];
buildInputs = [ perl ];
buildCommand = ''
mkdir -p $out
storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure)
printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure > $out/.reginfo
for path in $storePaths; do
cp --parents -rp $path $out/
done
'';
}