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 ? [ ] }: 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
optionalAttrs (attrs ? src.meta.homepage || attrs ? srcs && isList attrs.srcs && any (src: src ? meta.homepage) attrs.srcs) { 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. # should point to an http-browsable source tree, if available.
@ -487,10 +488,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 { }