nixos systemPackages: rework default outputs
- Now `pkg.outputUnspecified = true` but this attribute is missing in every output, so we can recognize whether the user chose or not. If (s)he didn't choose, we put `pkg.bin or pkg.out or pkg` into `systemPackages`. - `outputsToLink` is replaced by `extraOutputsToLink`. We add extra outputs *regardless* of whether the user chose anything. It's mainly meant for outputs with docs and debug symbols. - Note that as a result, some libraries will disappear from system path.
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
# directories in the list is not symlinked.
|
||||
pathsToLink ? ["/"]
|
||||
|
||||
, # The package outputs to include. By default, only the default
|
||||
# output is included.
|
||||
extraOutputsToLink ? []
|
||||
|
||||
, # Root the result in directory "$out${extraPrefix}", e.g. "/share".
|
||||
extraPrefix ? ""
|
||||
|
||||
@@ -37,7 +41,10 @@
|
||||
runCommand name
|
||||
rec { inherit manifest ignoreCollisions passthru meta pathsToLink extraPrefix postBuild buildInputs;
|
||||
pkgs = builtins.toJSON (map (drv: {
|
||||
paths = [ drv ];
|
||||
paths =
|
||||
[ drv ]
|
||||
++ lib.filter (p: p!=null)
|
||||
(builtins.map (outName: drv.${outName} or null) extraOutputsToLink);
|
||||
priority = drv.meta.priority or 5;
|
||||
}) paths);
|
||||
preferLocalBuild = true;
|
||||
|
||||
Reference in New Issue
Block a user