3
0
Fork 0
forked from mirrors/nixpkgs

* Provide a few fonts in a purely functional way, i.e., as part of the

system configuration. 

svn path=/nixos/trunk/; revision=7748
This commit is contained in:
Eelco Dolstra 2007-01-22 16:05:37 +00:00
parent 6db2c1814e
commit eddd3a7e11
2 changed files with 21 additions and 10 deletions

View file

@ -81,15 +81,26 @@ import ../helpers/make-etc.nix {
# (X11) client-rendered fonts.
source = pkgs.substituteAll {
src = ./etc/fonts/fonts.conf;
fontDirectories = map (dir: "<dir>${dir}</dir>")
[ # Search for fonts in...
# - the user's .fonts directory
"~/.fonts"
# - the user's current profile
"~/.nix-profile/lib/X11/fonts"
# - the default profile
"/nix/var/nix/profiles/default/lib/X11/fonts"
];
fontDirectories =
let
# Search for fonts in...
runtimeDirs = [
# - the user's .fonts directory
"~/.fonts"
# - the user's current profile
"~/.nix-profile/lib/X11/fonts"
# - the default profile
"/nix/var/nix/profiles/default/lib/X11/fonts"
];
systemFonts = [
# - a few statically built locations
pkgs.xorg.fontbhttf
pkgs.xorg.fontbh100dpi
pkgs.xorg.fontbhlucidatypewriter100dpi
pkgs.freefont_ttf
];
in
map (dir: "<dir>${dir}</dir>") (runtimeDirs ++ systemFonts);
};
target = "fonts/fonts.conf";
}

View file

@ -4,5 +4,5 @@
<fontconfig>
@fontDirectories@
</fontconfig>