buildenv: support very long paths

This commit is contained in:
Nikolay Amiantov
2015-10-22 15:35:39 +03:00
parent 7fb7fafe0f
commit d49140f3e4
2 changed files with 19 additions and 7 deletions
+8 -6
View File
@@ -34,12 +34,14 @@
}:
runCommand name
{ inherit manifest ignoreCollisions passthru pathsToLink extraPrefix postBuild buildInputs;
pkgs = builtins.toJSON (map (drv: {
paths = [ drv ]; # FIXME: handle multiple outputs
priority = drv.meta.priority or 5;
}) paths);
preferLocalBuild = true;
rec { inherit manifest ignoreCollisions passthru pathsToLink extraPrefix postBuild buildInputs;
pkgs = builtins.toJSON (map (drv: {
paths = [ drv ]; # FIXME: handle multiple outputs
priority = drv.meta.priority or 5;
}) paths);
preferLocalBuild = true;
# XXX: The size is somewhat arbitrary
passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else null;
}
''
${perl}/bin/perl -w ${./builder.pl}