diff --git a/config/desktop.nix b/config/desktop.nix index 15ca83ce..4c26e9a8 100644 --- a/config/desktop.nix +++ b/config/desktop.nix @@ -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 { }) ]; diff --git a/packages/linja-nanpa.nix b/packages/linja-nanpa.nix new file mode 100644 index 00000000..b8245a71 --- /dev/null +++ b/packages/linja-nanpa.nix @@ -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 + ''; +} diff --git a/packages/linja-sike.nix b/packages/linja-sike.nix deleted file mode 100644 index 461bf65a..00000000 --- a/packages/linja-sike.nix +++ /dev/null @@ -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} - ''; -}