Add caveat, just use original filename because of variable fonts

This commit is contained in:
Artemis Tosini 2023-09-10 05:16:58 +00:00
parent 4013f8df73
commit a5002a6881
Signed by: artemist
GPG key ID: EE5227935FE3FF18
2 changed files with 8 additions and 4 deletions

BIN
Caveat.ttf Normal file

Binary file not shown.

View file

@ -33,12 +33,10 @@
}: let
copyType = extension: pathName: let
filteredFiles = filter (pathEndsWith ("." + extension)) files;
filename = file: lists.last (strings.splitString "/" (toString file));
in
(optionalString (filteredFiles != []) "mkdir -p $out/share/fonts/${pathName}\n")
+ concatStringsSep "\n" (map (file: ''
filename=$(${pkgs.fontconfig}/bin/fc-query -f %{postscriptname} ${file}).${extension}
cp -v ${file} $out/share/fonts/${pathName}/$filename
'')
+ concatStringsSep "\n" (map (file: "cp -v ${file} $out/share/fonts/${pathName}/${filename file}")
filteredFiles);
in
pkgs.stdenvNoCC.mkDerivation {
@ -71,6 +69,12 @@
license = licenses.unfree;
author = "Colophon Foundry";
}
{
name = "Caveat";
files = [./Caveat.ttf];
license = licenses.ofl;
author = "Pablo Impallari and Alexi Vanyashin";
}
];
in {
packages = listToAttrs (map (font: {