This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/fonts/kreative.nix
2022-06-14 05:04:48 +00:00

52 lines
1.1 KiB
Nix

{
inputs,
pkgs,
...
}: let
open-relay = inputs.kreative-open-relay;
fonts =
[
{
name = "alco-sans";
path = "AlcoSans/AlcoSans";
}
{
name = "constructium";
path = "Constructium/Constructium";
}
{
name = "fairfax-hd";
path = "FairfaxHD/FairfaxHD";
}
{
name = "fairfax-hd-bold";
path = "FairfaxHD/FairfaxHDBold";
}
{
name = "fairfax-hax-hd";
path = "FairfaxHD/FairfaxHaxHD";
}
{
name = "fairfax-sm-hd";
path = "FairfaxHD/FairfaxSMHD";
}
]
++ (map (x: {
name = "fairfax-${pkgs.lib.strings.toLower x}";
path = "Fairfax/Fairfax${x}";
}) ["" "Bold" "Italic" "SM" "SMBold" "SMItalic" "Serif" "SerifSM"]);
in
builtins.listToAttrs (map (v: {
inherit (v) name;
value = pkgs.stdenvNoCC.mkDerivation {
pname = v.name;
version = open-relay.lastModifiedDate;
src = open-relay;
buildPhase = "true";
installPhase = ''
install -m444 $out/share/truetype/${v.name} ${v.path}.ttf
'';
};
})
fonts)