Add linja nanpa

This commit is contained in:
Charlotte 🦝 Delenk 2022-05-17 14:10:56 +01:00
parent 82d29ebe4c
commit 2502360bb2
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
3 changed files with 19 additions and 13 deletions

View file

@ -19,7 +19,7 @@ in
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Noto" ]; })
(import ../packages/linja-sike.nix pkgs)
(pkgs.callPackage ../packages/linja-nanpa.nix { })
];

18
packages/linja-nanpa.nix Normal file
View file

@ -0,0 +1,18 @@
{ stdenvNoCC, fetchFromGitHub, fontforge }:
stdenvNoCC.mkDerivation rec {
pname = "nasin-nanpa";
version = "2.5.18";
src = fetchFromGitHub {
owner = "ETBCOR";
repo = pname;
rev = "f464d17d992ce1d974983a54a25b57948d27e811";
sha256 = "sha256-zyKibrjvO5R0wbS2ocFRksJtrXjnW1I0gqkCAr/UZfc=";
};
nativeBuildInputs = [ 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
'';
}

View file

@ -1,12 +0,0 @@
{ stdenvNoCC, fetchurl, ... }:
let file = fetchurl {
url = "https://wyub.github.io/tokipona/linja-sike-5.otf";
sha256 = "12pxivj8dxkfk97zc6yq04dlxjl4wrs2ia1wzzyidj4vmqh0m5sc";
}; in
stdenvNoCC.mkDerivation {
pname = "linja-sike";
version = "5";
buildCommand = ''
install -m444 -Dt $out/share/fonts/opentype/linja-sike ${file}
'';
}