mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
makeFontsConf: refactor for readibility (#299220)
* makeFontsConf: refactor for readibility and to ease the possibility to override impureFontsDirectories
This commit is contained in:
parent
5c20a69c8c
commit
912d84a6d8
@ -1,5 +1,11 @@
|
||||
{ runCommand, stdenv, lib, libxslt, fontconfig, dejavu_fonts, fontDirectories
|
||||
, impureFontDirectories ? [
|
||||
{ runCommand, stdenv, lib, libxslt, fontconfig, dejavu_fonts }:
|
||||
|
||||
let fontconfig_ = fontconfig; in
|
||||
{
|
||||
fontconfig ? fontconfig_
|
||||
# an array of fonts, e.g. `[ pkgs.dejavu_fonts.minimal ]`
|
||||
, fontDirectories
|
||||
, impureFontDirectories ? [
|
||||
# nix user profile
|
||||
"~/.nix-profile/lib/X11/fonts" "~/.nix-profile/share/fonts"
|
||||
]
|
||||
@ -11,7 +17,8 @@
|
||||
# darwin paths
|
||||
++ lib.optionals stdenv.isDarwin [ "/Library/Fonts" "/System/Library/Fonts" ]
|
||||
# nix default profile
|
||||
++ [ "/nix/var/nix/profiles/default/lib/X11/fonts" "/nix/var/nix/profiles/default/share/fonts" ] }:
|
||||
++ [ "/nix/var/nix/profiles/default/lib/X11/fonts" "/nix/var/nix/profiles/default/share/fonts" ]
|
||||
}:
|
||||
|
||||
runCommand "fonts.conf"
|
||||
{
|
||||
|
@ -21002,10 +21002,7 @@ with pkgs;
|
||||
|
||||
fortify-headers = callPackage ../development/libraries/fortify-headers { };
|
||||
|
||||
makeFontsConf = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
|
||||
callPackage ../development/libraries/fontconfig/make-fonts-conf.nix {
|
||||
inherit fontconfig fontDirectories;
|
||||
};
|
||||
makeFontsConf = callPackage ../development/libraries/fontconfig/make-fonts-conf.nix { };
|
||||
|
||||
makeFontsCache = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
|
||||
callPackage ../development/libraries/fontconfig/make-fonts-cache.nix {
|
||||
|
Loading…
Reference in New Issue
Block a user