buildEnv: Support package priorities like nix-env

This gets rid of a bunch of collision warnings.
This commit is contained in:
Eelco Dolstra
2015-08-25 00:40:40 +02:00
parent 9c61317002
commit e4610f2965
7 changed files with 53 additions and 32 deletions
+7 -3
View File
@@ -9,10 +9,10 @@
, # The manifest file (if any). A symlink $out/manifest will be
# created to it.
manifest ? ""
, # The paths to symlink.
paths
, # Whether to ignore collisions or abort.
ignoreCollisions ? false
@@ -28,7 +28,11 @@
}:
runCommand name
{ inherit manifest paths ignoreCollisions passthru pathsToLink postBuild;
{ inherit manifest ignoreCollisions passthru pathsToLink postBuild;
pkgs = builtins.toJSON (map (drv: {
paths = [ drv ]; # FIXME: handle multiple outputs
priority = drv.meta.priority or 5;
}) paths);
preferLocalBuild = true;
}
''