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
fde7296a4749efadbeb8b608b7b4cc01c3a6e6d7,
fa412972091538376d1d4ffd446803b5d9385cbb, and
c981787db951afb11c1328461df82d4277ebec07.
This commit is contained in:
parent
a64058e205
commit
d32f51c618
@ -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…
x
Reference in New Issue
Block a user