Add caveat, just use original filename because of variable fonts
This commit is contained in:
parent
4013f8df73
commit
a5002a6881
BIN
Caveat.ttf
Normal file
BIN
Caveat.ttf
Normal file
Binary file not shown.
12
flake.nix
12
flake.nix
|
@ -33,12 +33,10 @@
|
||||||
}: let
|
}: let
|
||||||
copyType = extension: pathName: let
|
copyType = extension: pathName: let
|
||||||
filteredFiles = filter (pathEndsWith ("." + extension)) files;
|
filteredFiles = filter (pathEndsWith ("." + extension)) files;
|
||||||
|
filename = file: lists.last (strings.splitString "/" (toString file));
|
||||||
in
|
in
|
||||||
(optionalString (filteredFiles != []) "mkdir -p $out/share/fonts/${pathName}\n")
|
(optionalString (filteredFiles != []) "mkdir -p $out/share/fonts/${pathName}\n")
|
||||||
+ concatStringsSep "\n" (map (file: ''
|
+ concatStringsSep "\n" (map (file: "cp -v ${file} $out/share/fonts/${pathName}/${filename file}")
|
||||||
filename=$(${pkgs.fontconfig}/bin/fc-query -f %{postscriptname} ${file}).${extension}
|
|
||||||
cp -v ${file} $out/share/fonts/${pathName}/$filename
|
|
||||||
'')
|
|
||||||
filteredFiles);
|
filteredFiles);
|
||||||
in
|
in
|
||||||
pkgs.stdenvNoCC.mkDerivation {
|
pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
@ -71,6 +69,12 @@
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
author = "Colophon Foundry";
|
author = "Colophon Foundry";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Caveat";
|
||||||
|
files = [./Caveat.ttf];
|
||||||
|
license = licenses.ofl;
|
||||||
|
author = "Pablo Impallari and Alexi Vanyashin";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
packages = listToAttrs (map (font: {
|
packages = listToAttrs (map (font: {
|
||||||
|
|
Loading…
Reference in a new issue