mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 06:33:42 +00:00
cf3f1e9f23
because the bashrc already cares on that, even taking into account all the usual nixos profiles. As a side change, I changed a tab to spaces in bashrc. svn path=/nixos/trunk/; revision=21439
37 lines
950 B
Nix
37 lines
950 B
Nix
{config, pkgs, ...}:
|
|
|
|
let
|
|
|
|
# Quick hack to make the `info' command work properly. `info' needs
|
|
# a "dir" file containing all the installed Info files, which we
|
|
# don't have (it would be impure to have a package installation
|
|
# update some global "dir" file). So this wrapper script around
|
|
# "info" builds a temporary "dir" file on the fly. This is a bit
|
|
# slow (on a cold cache) but not unacceptably so.
|
|
infoWrapper = pkgs.writeScriptBin "info"
|
|
''
|
|
#! ${pkgs.stdenv.shell}
|
|
|
|
dir=$(mktemp --tmpdir -d "info.dir.XXXXXX")
|
|
|
|
if test -z "$dir"; then exit 1; fi
|
|
|
|
trap 'rm -rf "$dir"' EXIT
|
|
|
|
shopt -s nullglob
|
|
|
|
for i in $(IFS=:; echo $INFOPATH); do
|
|
for j in $i/*.info; do
|
|
${pkgs.texinfo}/bin/install-info --quiet $j $dir/dir
|
|
done
|
|
done
|
|
|
|
INFOPATH=$dir:$INFOPATH ${pkgs.texinfo}/bin/info "$@"
|
|
''; # */
|
|
|
|
in
|
|
|
|
{
|
|
environment.systemPackages = [infoWrapper];
|
|
}
|