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
@ -443,6 +443,7 @@ let
|
||||
commonMeta = { validity, attrs, pos ? null, references ? [ ] }:
|
||||
let
|
||||
outputs = attrs.outputs or [ "out" ];
|
||||
hasOutput = out: builtins.elem out outputs;
|
||||
in
|
||||
{
|
||||
# `name` derivation attribute includes cross-compilation cruft,
|
||||
@ -461,10 +462,13 @@ let
|
||||
# Services and users should specify outputs explicitly,
|
||||
# unless they are comfortable with this default.
|
||||
outputsToInstall =
|
||||
let
|
||||
hasOutput = out: builtins.elem out outputs;
|
||||
in
|
||||
[ (findFirst hasOutput null ([ "bin" "out" ] ++ outputs)) ]
|
||||
[
|
||||
(
|
||||
if hasOutput "bin" then "bin"
|
||||
else if hasOutput "out" then "out"
|
||||
else findFirst hasOutput null outputs
|
||||
)
|
||||
]
|
||||
++ optional (hasOutput "man") "man";
|
||||
}
|
||||
// attrs.meta or { }
|
||||
|
Loading…
Reference in New Issue
Block a user