cc-wrapper, bintools-wrapper: simply symlink man and info outputs

With the previous commit `propagateDoc` is now always given the correct value
(i.e. it is never set to `true` when there are no `man` and `info` outputs).
Hence, we can simply symlink the original outputs to the wrapper outputs.

Pros:

- simpler, less indirection compared to `propagated-user-env-packages`,
- uses less inodes (1 symlink, which nix then simply automatically resolves
  and removes, vs. two directories and a file),
- makes direct references like "export MANPATH=${stdenv.cc.man}/share/man"
  simply work.

Cons:

- I'm not aware of any.

This and the previous commit together almost completely revert commits
fde7296a47,
fa41297209, and
c981787db9.
This commit is contained in:
Jan Malakhovski 2018-09-05 18:35:16 +00:00
parent a64058e205
commit d32f51c618
2 changed files with 4 additions and 6 deletions

View File

@ -268,9 +268,8 @@ stdenv.mkDerivation {
## Man page and info support
##
mkdir -p $man/nix-support $info/nix-support
echo ${bintools.man or ""} >> $man/nix-support/propagated-user-env-packages
echo ${bintools.info or ""} >> $info/nix-support/propagated-user-env-packages
ln -s ${bintools.man} $man
ln -s ${bintools.info} $info
''
+ ''

View File

@ -263,9 +263,8 @@ stdenv.mkDerivation {
## Man page and info support
##
mkdir -p $man/nix-support $info/nix-support
printWords ${cc.man or ""} > $man/nix-support/propagated-user-env-packages
printWords ${cc.info or ""} > $info/nix-support/propagated-user-env-packages
ln -s ${cc.man} $man
ln -s ${cc.info} $info
''
+ ''