* Make it possible to turn off the generation of fonts.conf. This is
important for the installation CD, where we don't want a dependency on all those fonts. Of course, it's quite nice that turning off the generation of a file automatically removes the dependencies on the files referenced by that file. svn path=/nixos/trunk/; revision=7750
This commit is contained in:
parent
6cb01a0b22
commit
327cb83cf2
|
@ -49,10 +49,14 @@ rec {
|
|||
|
||||
};
|
||||
|
||||
fonts = {
|
||||
enableFontConfig = false;
|
||||
};
|
||||
|
||||
installer = {
|
||||
nixpkgsURL = http://nix.cs.uu.nl/dist/nix/ + nixpkgsRel;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -77,35 +77,36 @@ import ../helpers/make-etc.nix {
|
|||
target = "profile";
|
||||
}
|
||||
|
||||
{ # Configuration file for fontconfig used to locate
|
||||
# (X11) client-rendered fonts.
|
||||
source = pkgs.runCommand "fonts.conf"
|
||||
{
|
||||
fontDirectories = [
|
||||
# - 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"
|
||||
# - a few statically built locations
|
||||
pkgs.xorg.fontbhttf
|
||||
pkgs.xorg.fontbh100dpi
|
||||
pkgs.xorg.fontbhlucidatypewriter100dpi
|
||||
pkgs.freefont_ttf
|
||||
];
|
||||
buildInputs = [pkgs.libxslt];
|
||||
inherit (pkgs) fontconfig;
|
||||
}
|
||||
"xsltproc --stringparam fontDirectories \"$fontDirectories\" \\
|
||||
${./etc/fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\
|
||||
> $out
|
||||
";
|
||||
target = "fonts/fonts.conf";
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
# Configuration file for fontconfig used to locate
|
||||
# (X11) client-rendered fonts.
|
||||
++ (optional ["fonts" "enableFontConfig"] {
|
||||
source = pkgs.runCommand "fonts.conf"
|
||||
{
|
||||
fontDirectories = [
|
||||
# - 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"
|
||||
# - a few statically built locations
|
||||
pkgs.xorg.fontbhttf
|
||||
pkgs.xorg.fontbh100dpi
|
||||
pkgs.xorg.fontbhlucidatypewriter100dpi
|
||||
pkgs.freefont_ttf
|
||||
];
|
||||
buildInputs = [pkgs.libxslt];
|
||||
inherit (pkgs) fontconfig;
|
||||
}
|
||||
"xsltproc --stringparam fontDirectories \"$fontDirectories\" \\
|
||||
${./etc/fonts/make-fonts-conf.xsl} $fontconfig/etc/fonts/fonts.conf \\
|
||||
> $out
|
||||
";
|
||||
target = "fonts/fonts.conf";
|
||||
})
|
||||
|
||||
# LDAP configuration.
|
||||
++ (optional ["users" "ldap" "enable"] {
|
||||
source = import etc/ldap.conf.nix {
|
||||
|
|
|
@ -579,5 +579,18 @@
|
|||
";
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
name = ["fonts" "enableFontConfig"];
|
||||
default = true;
|
||||
description = "
|
||||
If enabled, a fontconfig configuration file will be built
|
||||
pointing to a set of default fonts. If you don't care about
|
||||
running X11 applications or any other program that uses
|
||||
fontconfig, you can turn this option off and prevent a
|
||||
dependency on all those fonts.
|
||||
";
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue