* Pure X server. All fonts are now in the Nix store.
svn path=/nixos/trunk/; revision=8041
This commit is contained in:
parent
0828400b36
commit
3ad2c91939
@ -88,23 +88,7 @@ import ../helpers/make-etc.nix {
|
||||
++ (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"
|
||||
"~/.nix-profile/share/fonts"
|
||||
# - the default profile
|
||||
"/nix/var/nix/profiles/default/lib/X11/fonts"
|
||||
"/nix/var/nix/profiles/default/share/fonts"
|
||||
# - a few statically built locations
|
||||
pkgs.xorg.fontbhttf
|
||||
pkgs.xorg.fontbh100dpi
|
||||
pkgs.xorg.fontbhlucidatypewriter100dpi
|
||||
pkgs.ttf_bitstream_vera
|
||||
pkgs.corefonts
|
||||
pkgs.freefont_ttf
|
||||
];
|
||||
fontDirectories = import ./fonts.nix {inherit pkgs;};
|
||||
buildInputs = [pkgs.libxslt];
|
||||
inherit (pkgs) fontconfig;
|
||||
}
|
||||
|
22
system/fonts.nix
Normal file
22
system/fonts.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{pkgs}:
|
||||
|
||||
[
|
||||
# - the user's .fonts directory
|
||||
"~/.fonts"
|
||||
# - the user's current profile
|
||||
"~/.nix-profile/lib/X11/fonts"
|
||||
"~/.nix-profile/share/fonts"
|
||||
# - the default profile
|
||||
"/nix/var/nix/profiles/default/lib/X11/fonts"
|
||||
"/nix/var/nix/profiles/default/share/fonts"
|
||||
# - a few statically built locations
|
||||
pkgs.xorg.fontbhttf
|
||||
pkgs.xorg.fontbhlucidatypewriter100dpi
|
||||
pkgs.ttf_bitstream_vera
|
||||
pkgs.corefonts
|
||||
pkgs.freefont_ttf
|
||||
pkgs.xorg.fontbh100dpi
|
||||
pkgs.xorg.fontmiscmisc
|
||||
pkgs.xorg.fontalias
|
||||
pkgs.xorg.fontcursormisc
|
||||
]
|
@ -118,8 +118,9 @@ import ../upstart-jobs/gather.nix {
|
||||
# X server.
|
||||
++ optional ["services" "xserver" "enable"]
|
||||
(import ../upstart-jobs/xserver.nix {
|
||||
inherit (pkgs) substituteAll;
|
||||
inherit (pkgs) stdenv lib;
|
||||
inherit (pkgs.xorg) xorgserver xf86inputkeyboard xf86inputmouse xf86videovesa;
|
||||
fontDirectories = import ./fonts.nix {inherit pkgs;};
|
||||
})
|
||||
|
||||
# Apache httpd.
|
||||
|
@ -1,4 +1,5 @@
|
||||
Section "Files"
|
||||
@fontPaths@
|
||||
EndSection
|
||||
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
{ substituteAll
|
||||
{ stdenv
|
||||
|
||||
, lib
|
||||
|
||||
, xorgserver
|
||||
|
||||
@ -14,13 +16,29 @@
|
||||
, # X display number.
|
||||
display ? 0
|
||||
|
||||
, # List of font directories.
|
||||
fontDirectories
|
||||
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
config = substituteAll {
|
||||
config = stdenv.mkDerivation {
|
||||
name = "xserver.conf";
|
||||
src = ./xserver.conf;
|
||||
inherit fontDirectories;
|
||||
buildCommand = "
|
||||
buildCommand= # urgh, don't substitute this
|
||||
export fontPaths=
|
||||
for i in $fontDirectories; do
|
||||
if test \"\${i:0:\${#NIX_STORE}}\" == \"$NIX_STORE\"; then
|
||||
for j in $(find $i -name fonts.dir); do
|
||||
fontPaths=\"\${fontPaths}FontPath \\\"$(dirname $j)\\\"\\n\"
|
||||
done
|
||||
fi
|
||||
done
|
||||
substituteAll $src $out
|
||||
";
|
||||
};
|
||||
|
||||
in
|
||||
@ -39,11 +57,9 @@ end script
|
||||
exec ${xorgserver}/bin/X \\
|
||||
-ac -nolisten tcp -terminate \\
|
||||
-logfile /var/log/X.${toString display}.log \\
|
||||
-fp /var/fonts \\
|
||||
-modulepath ${xorgserver}/lib/xorg/modules,${xf86inputkeyboard}/lib/xorg/modules/input,${xf86inputmouse}/lib/xorg/modules/input,${xf86videovesa}/lib/xorg/modules/drivers \\
|
||||
-config ${config} \\
|
||||
:${toString display} vt${toString tty}
|
||||
|
||||
";
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user