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/nasin-nanpa.nix

33 lines
922 B
Nix
Raw Normal View History

{
inputs,
pkgs,
...
}: rec {
2022-06-14 14:11:01 +00:00
nasin-nanpa = pkgs.stdenvNoCC.mkDerivation rec {
pname = "nasin-nanpa";
version = "2.5.25";
src = inputs.nasin-nanpa;
nativeBuildInputs = [pkgs.fontforge];
buildPhase = ''
fontforge -lang=ff -c 'Open($1); Generate($2)' "ffversions/2.5/nasin-nanpa-${version}.sfd" "nasin-nanpa.otf"
'';
installPhase = ''
install -m444 -Dt $out/share/fonts/opentype/nasin-nanpa nasin-nanpa.otf
'';
};
nasin-nanpa-woff2 = pkgs.stdenvNoCC.mkDerivation rec {
name = "nasin-nanpa-${nasin-nanpa.version}.woff2";
inherit (nasin-nanpa) version;
src = inputs.nasin-nanpa;
buildInputs = [nasin-nanpa];
nativeBuildInputs = [pkgs.woff2];
buildPhase = ''
cp ${nasin-nanpa}/share/fonts/opentype/nasin-nanpa/nasin-nanpa.otf .
woff2_compress nasin-nanpa.otf
'';
installPhase = ''
cp nasin-nanpa.woff2 $out
'';
};
}