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.
wip/yesman
Jan Malakhovski 6 years ago
parent a64058e205
commit d32f51c618
  1. 5
      pkgs/build-support/bintools-wrapper/default.nix
  2. 5
      pkgs/build-support/cc-wrapper/default.nix

@ -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
''
+ ''

@ -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
''
+ ''

Loading…
Cancel
Save