modules/config/fonts.nix: export GDFONTPATH in /etc/profile

Set the environment variable GDFONTPATH to the list of directories where fonts
are expected to be installed. This is search path is used by same GD-based
applications, such as Gnuplot.

Alternatively, we could rely on fontconfig to achieve the same thing, i.e. by
running

  for n in $(fc-list | sed -r -e 's|^([^:]+):.*$|\1|'); do echo $(dirname "$n"); done | sort | uniq

to get that list at run-time, but the static approach feels more deterministic.
This commit is contained in:
Peter Simons 2013-02-17 22:47:08 +01:00
parent 233cc2fdaa
commit 2802538dc2

View file

@ -171,6 +171,7 @@ in
environment.shellInit =
''
export FONTCONFIG_FILE=/etc/fonts/fonts.conf
export GDFONTPATH=${concatStringsSep ":" config.fonts.fonts}
'';
environment.systemPackages =