bintools-wrapper: only propagate .info output if it exists in the original

This commit is contained in:
Dmitry Kalinkin 2020-04-20 23:47:17 -04:00
parent 3e880bad79
commit c450617f99
No known key found for this signature in database
GPG Key ID: 5157B3EC8B2CA333
1 changed files with 4 additions and 3 deletions

View File

@ -85,7 +85,7 @@ stdenv.mkDerivation {
inherit targetPrefix infixSalt; inherit targetPrefix infixSalt;
outputs = [ "out" ] ++ optionals propagateDoc [ "man" "info" ]; outputs = [ "out" ] ++ optionals propagateDoc ([ "man" ] ++ optional (bintools ? info) "info");
passthru = { passthru = {
inherit bintools libc nativeTools nativeLibc nativePrefix; inherit bintools libc nativeTools nativeLibc nativePrefix;
@ -259,14 +259,15 @@ stdenv.mkDerivation {
printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages printWords ${bintools_bin} ${if libc == null then "" else libc_bin} > $out/nix-support/propagated-user-env-packages
'' ''
+ optionalString propagateDoc '' + optionalString propagateDoc (''
## ##
## Man page and info support ## Man page and info support
## ##
ln -s ${bintools.man} $man ln -s ${bintools.man} $man
'' + optionalString (bintools ? info) ''
ln -s ${bintools.info} $info ln -s ${bintools.info} $info
'' '')
+ '' + ''
## ##