linkBinIntoOwnPackage: protect against empty doc/man outputs

This commit is contained in:
2025-07-22 23:40:39 +00:00
parent 457beaca20
commit 76c16deae1

View File

@@ -98,7 +98,13 @@
paths = if lib.isList path' then path else [ path' ]; #< coerce to list paths = if lib.isList path' then path else [ path' ]; #< coerce to list
paths' = (lib.map (p: "bin/${p}") paths) ++ [ "share/doc" "share/man" ]; paths' = (lib.map (p: "bin/${p}") paths) ++ [ "share/doc" "share/man" ];
in in
linkIntoOwnPackage pkg paths' {} linkIntoOwnPackage pkg paths' {
postFixup = ''
# not all packages ship manpages or docs,
# but we can't know if that's the case upfront, generically.
mkdir -p "$doc" "$man"
'';
}
; ;
deepLinkIntoOwnPackage = pkg: { outputs ? [ "out" ] }: symlinkJoin { deepLinkIntoOwnPackage = pkg: { outputs ? [ "out" ] }: symlinkJoin {