add nasin-nanpa

This commit is contained in:
Charlotte 🦝 Delenk 2022-06-14 15:11:01 +01:00
parent e61c97100c
commit 8014a91e54
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
3 changed files with 48 additions and 0 deletions

View file

@ -130,6 +130,22 @@
"url": "https://git.chir.rs/CarolineHusky/MiiFox.net"
}
},
"nasin-nanpa": {
"flake": false,
"locked": {
"lastModified": 1653261911,
"narHash": "sha256-f92PUd4pIS7wK5W0vJ79Qvtw1d8VVW0gquBWW1XWSpw=",
"owner": "ETBCOR",
"repo": "nasin-nanpa",
"rev": "4cf4a762576d8ca2818683139ab1d04d149c9bec",
"type": "github"
},
"original": {
"owner": "ETBCOR",
"repo": "nasin-nanpa",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1653581809,
@ -187,6 +203,7 @@
"matrix-media-repo": "matrix-media-repo",
"mautrix-whatsapp": "mautrix-whatsapp",
"miifox-net": "miifox-net",
"nasin-nanpa": "nasin-nanpa",
"nixpkgs": "nixpkgs_2",
"nixpkgs-go116": "nixpkgs-go116"
}

View file

@ -20,6 +20,8 @@
gomod2nix.url = "github:tweag/gomod2nix";
kreative-open-relay.url = "github:kreativekorp/open-relay";
kreative-open-relay.flake = false;
nasin-nanpa.url = "github:ETBCOR/nasin-nanpa";
nasin-nanpa.flake = false;
};
outputs = {
@ -49,6 +51,7 @@
./matrix/matrix-media-repo
./matrix/mautrix-whatsapp
./fonts/kreative.nix
./fonts/nasin-nanpa.nix
]);
hydraJobs = {

28
fonts/nasin-nanpa.nix Normal file
View file

@ -0,0 +1,28 @@
{ inputs, pkgs, ...}: rec {
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
'';
};
}