fontconfig-penultimate: init at 0.2
Also provides a NixOS module.
This commit is contained in:
parent
65592837b6
commit
354ea69ae4
57
nixos/modules/config/fonts/fontconfig-penultimate.nix
Normal file
57
nixos/modules/config/fonts/fontconfig-penultimate.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.fonts.fontconfig.penultimate;
|
||||
|
||||
latestVersion = pkgs.fontconfig.configVersion;
|
||||
|
||||
# The configuration to be included in /etc/font/
|
||||
confPkg = pkgs.runCommand "font-penultimate-conf" {} ''
|
||||
support_folder=$out/etc/fonts/conf.d
|
||||
latest_folder=$out/etc/fonts/${latestVersion}/conf.d
|
||||
|
||||
mkdir -p $support_folder
|
||||
mkdir -p $latest_folder
|
||||
|
||||
# fontconfig ultimate various configuration files
|
||||
ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
|
||||
$support_folder
|
||||
ln -s ${pkgs.fontconfig-penultimate}/etc/fonts/conf.d/*.conf \
|
||||
$latest_folder
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
|
||||
fonts = {
|
||||
|
||||
fontconfig = {
|
||||
|
||||
penultimate = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Enable fontconfig-penultimate settings to supplement the
|
||||
NixOS defaults by providing per-font rendering defaults and
|
||||
metric aliases.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf (config.fonts.fontconfig.enable && cfg.enable) {
|
||||
|
||||
fonts.fontconfig.confPackages = [ confPkg ];
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -1,8 +1,9 @@
|
||||
[
|
||||
./config/debug-info.nix
|
||||
./config/fonts/corefonts.nix
|
||||
./config/fonts/fontconfig-ultimate.nix
|
||||
./config/fonts/fontconfig.nix
|
||||
./config/fonts/fontconfig-penultimate.nix
|
||||
./config/fonts/fontconfig-ultimate.nix
|
||||
./config/fonts/fontdir.nix
|
||||
./config/fonts/fonts.nix
|
||||
./config/fonts/ghostscript.nix
|
||||
|
18
pkgs/data/fonts/fontconfig-penultimate/default.nix
Normal file
18
pkgs/data/fonts/fontconfig-penultimate/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
let version = "0.2"; in
|
||||
stdenv.mkDerivation {
|
||||
name = "fontconfig-penultimate-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ttuegel";
|
||||
repo = "fontconfig-penultimate";
|
||||
rev = version;
|
||||
sha256 = "106sjfmxdn2cachgsg0ky3wi676x6nd14y5fcl16n82kghi3d9yf";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/etc/fonts/conf.d
|
||||
cp *.conf $out/etc/fonts/conf.d
|
||||
'';
|
||||
}
|
@ -7330,6 +7330,8 @@ with pkgs;
|
||||
|
||||
fontconfig = callPackage ../development/libraries/fontconfig { };
|
||||
|
||||
fontconfig-penultimate = callPackage ../data/fonts/fontconfig-penultimate {};
|
||||
|
||||
fontconfig-ultimate = callPackage ../development/libraries/fontconfig-ultimate {};
|
||||
|
||||
folly = callPackage ../development/libraries/folly { };
|
||||
|
Loading…
Reference in New Issue
Block a user