Merge pull request #297350 from adisbladis/commonmeta-output-list

stdenv/check-meta: Remove outputsToInstall list concat from common meta
This commit is contained in:
adisbladis 2024-03-30 19:07:32 +13:00 committed by GitHub
commit c605bfd501
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -447,6 +447,7 @@ let
commonMeta = { validity, attrs, pos ? null, references ? [ ] }:
let
outputs = attrs.outputs or [ "out" ];
hasOutput = out: builtins.elem out outputs;
in
optionalAttrs (attrs ? src.meta.homepage || attrs ? srcs && isList attrs.srcs && any (src: src ? meta.homepage) attrs.srcs) {
# should point to an http-browsable source tree, if available.
@ -487,10 +488,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 { }