tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
makeFontsCache: init
Nikolay Amiantov
10 years ago
893af775
cb6beb1e
+32
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
fontconfig
make-fonts-cache.nix
top-level
all-packages.nix
+27
pkgs/development/libraries/fontconfig/make-fonts-cache.nix
···
1
1
+
{ runCommand, lib, writeText, fontconfig, fontbhttf, fontDirectories }:
2
2
+
3
3
+
runCommand "fc-cache"
4
4
+
rec {
5
5
+
buildInputs = [ fontconfig ];
6
6
+
passAsFile = [ "fontDirs" ];
7
7
+
fontDirs = ''
8
8
+
<!-- Font directories -->
9
9
+
${lib.concatStringsSep "\n" (map (font: "<dir>${font}</dir>") fontDirectories)}
10
10
+
'';
11
11
+
}
12
12
+
''
13
13
+
export FONTCONFIG_FILE=$(pwd)/fonts.conf
14
14
+
15
15
+
cat > fonts.conf << EOF
16
16
+
<?xml version='1.0'?>
17
17
+
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
18
18
+
<fontconfig>
19
19
+
<include>${fontconfig}/etc/fonts/fonts.conf</include>
20
20
+
<cachedir>$out</cachedir>
21
21
+
EOF
22
22
+
cat "$fontDirsPath" >> fonts.conf
23
23
+
echo "</fontconfig>" >> fonts.conf
24
24
+
25
25
+
mkdir -p $out
26
26
+
fc-cache -sv
27
27
+
''
+5
pkgs/top-level/all-packages.nix
···
6503
6503
inherit fontconfig fontDirectories;
6504
6504
};
6505
6505
6506
6506
+
makeFontsCache = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
6507
6507
+
callPackage ../development/libraries/fontconfig/make-fonts-cache.nix {
6508
6508
+
inherit fontconfig fontDirectories;
6509
6509
+
};
6510
6510
+
6506
6511
freealut = callPackage ../development/libraries/freealut { };
6507
6512
6508
6513
freeglut = callPackage ../development/libraries/freeglut { };