makeFontsCache: init

+32
+27
pkgs/development/libraries/fontconfig/make-fonts-cache.nix
···
··· 1 + { runCommand, lib, writeText, fontconfig, fontbhttf, fontDirectories }: 2 + 3 + runCommand "fc-cache" 4 + rec { 5 + buildInputs = [ fontconfig ]; 6 + passAsFile = [ "fontDirs" ]; 7 + fontDirs = '' 8 + <!-- Font directories --> 9 + ${lib.concatStringsSep "\n" (map (font: "<dir>${font}</dir>") fontDirectories)} 10 + ''; 11 + } 12 + '' 13 + export FONTCONFIG_FILE=$(pwd)/fonts.conf 14 + 15 + cat > fonts.conf << EOF 16 + <?xml version='1.0'?> 17 + <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> 18 + <fontconfig> 19 + <include>${fontconfig}/etc/fonts/fonts.conf</include> 20 + <cachedir>$out</cachedir> 21 + EOF 22 + cat "$fontDirsPath" >> fonts.conf 23 + echo "</fontconfig>" >> fonts.conf 24 + 25 + mkdir -p $out 26 + fc-cache -sv 27 + ''
+5
pkgs/top-level/all-packages.nix
··· 6503 inherit fontconfig fontDirectories; 6504 }; 6505 6506 freealut = callPackage ../development/libraries/freealut { }; 6507 6508 freeglut = callPackage ../development/libraries/freeglut { };
··· 6503 inherit fontconfig fontDirectories; 6504 }; 6505 6506 + makeFontsCache = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}: 6507 + callPackage ../development/libraries/fontconfig/make-fonts-cache.nix { 6508 + inherit fontconfig fontDirectories; 6509 + }; 6510 + 6511 freealut = callPackage ../development/libraries/freealut { }; 6512 6513 freeglut = callPackage ../development/libraries/freeglut { };