diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 63c853e3dc31..4f6011a3d5cb 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -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 { }