mirror of
https://github.com/ilyakooo0/nix-bundle.git
synced 2024-10-26 08:42:01 +03:00
18 lines
515 B
Nix
18 lines
515 B
Nix
{ stdenv, perl, pathsFromGraph }:
|
|
|
|
{ name, targets }:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit name;
|
|
exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets;
|
|
nativeBuildInputs = [ perl ];
|
|
buildCommand = ''
|
|
storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure-*)
|
|
# printRegistration=1 ${perl}/bin/perl ${pathsFromGraph} ./closure-* > .reginfo
|
|
tar cvfj $out \
|
|
--owner=0 --group=0 --mode=u+rw,uga+r \
|
|
--hard-dereference \
|
|
$storePaths
|
|
'';
|
|
}
|