mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 14:09:17 +03:00
stdenv/check-meta: Remove outputsToInstall list concat from common meta
Normally either of "bin" or "out" will hit first so we can avoid dynamic looping altogether.
This commit is contained in:
parent
7872526e9c
commit
1e2f8f2a84
1 changed files with 8 additions and 4 deletions
|
@ -443,6 +443,7 @@ let
|
||||||
commonMeta = { validity, attrs, pos ? null, references ? [ ] }:
|
commonMeta = { validity, attrs, pos ? null, references ? [ ] }:
|
||||||
let
|
let
|
||||||
outputs = attrs.outputs or [ "out" ];
|
outputs = attrs.outputs or [ "out" ];
|
||||||
|
hasOutput = out: builtins.elem out outputs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# `name` derivation attribute includes cross-compilation cruft,
|
# `name` derivation attribute includes cross-compilation cruft,
|
||||||
|
@ -461,10 +462,13 @@ let
|
||||||
# Services and users should specify outputs explicitly,
|
# Services and users should specify outputs explicitly,
|
||||||
# unless they are comfortable with this default.
|
# unless they are comfortable with this default.
|
||||||
outputsToInstall =
|
outputsToInstall =
|
||||||
let
|
[
|
||||||
hasOutput = out: builtins.elem out outputs;
|
(
|
||||||
in
|
if hasOutput "bin" then "bin"
|
||||||
[ (findFirst hasOutput null ([ "bin" "out" ] ++ outputs)) ]
|
else if hasOutput "out" then "out"
|
||||||
|
else findFirst hasOutput null outputs
|
||||||
|
)
|
||||||
|
]
|
||||||
++ optional (hasOutput "man") "man";
|
++ optional (hasOutput "man") "man";
|
||||||
}
|
}
|
||||||
// attrs.meta or { }
|
// attrs.meta or { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue