add kreative fonts

This commit is contained in:
Charlotte 🦝 Delenk 2022-09-25 18:21:17 +01:00
parent 6737832252
commit e70a928d67
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
9 changed files with 140 additions and 48 deletions

View file

@ -24,4 +24,9 @@
emoji-volpeon-vlpn = pkgs.callPackage ./art/emoji/volpeon/vlpn.nix {};
lotte-art = pkgs.callPackage ./art/lotte {};
drone-runner-docker = pkgs.callPackage ./ci/drone-runner-docker {};
alco-sans = pkgs.callPackage ./fonts/kreative/alco-sans.nix {};
constructium = pkgs.callPackage ./fonts/kreative/constructium.nix {};
fairfax = pkgs.callPackage ./fonts/kreative/fairfax.nix {};
fairfax-hd = pkgs.callPackage ./fonts/kreative/fairfax-hd.nix {};
kreative-square = pkgs.callPackage ./fonts/kreative/kreative-square.nix {};
}

View file

@ -1,48 +0,0 @@
{
inputs,
pkgs,
...
}: let
open-relay = inputs.kreative-open-relay;
fonts =
[
{
name = "alco-sans";
path = "AlcoSans/AlcoSans";
}
{
name = "constructium";
path = "Constructium/Constructium";
}
{
name = "fairfax-hd";
path = "FairfaxHD/FairfaxHD";
}
{
name = "fairfax-hax-hd";
path = "FairfaxHD/FairfaxHaxHD";
}
{
name = "fairfax-sm-hd";
path = "FairfaxHD/FairfaxSMHD";
}
]
++ (map (x: {
name = "fairfax-${pkgs.lib.strings.toLower x}";
path = "Fairfax/Fairfax${x}";
}) ["" "Bold" "Italic" "SM" "SMBold" "SMItalic" "Serif" "SerifSM"]);
in
builtins.listToAttrs (map (v: {
inherit (v) name;
value = pkgs.stdenvNoCC.mkDerivation {
pname = v.name;
version = open-relay.lastModifiedDate;
src = open-relay;
buildPhase = "true";
installPhase = ''
install -m444 -Dt $out/share/truetype/${v.name} ${v.path}.ttf
'';
};
})
fonts)

View file

@ -0,0 +1,21 @@
{
stdenv,
callPackage,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenv.mkDerivation {
name = "alco-sans";
version = source.date;
src = callPackage ./source.nix {};
preferLocalBuild = true;
buildPhase = "true";
installPhase = ''
install -m444 -Dt $out/share/truetype/AlcoSans AlcoSans/AlcoSans.ttf
'';
meta = {
description = "Font by Kreative Software";
license = lib.licenses.ofl;
};
}

View file

@ -0,0 +1,21 @@
{
stdenv,
callPackage,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenv.mkDerivation {
name = "constructium";
version = source.date;
src = callPackage ./source.nix {};
preferLocalBuild = true;
buildPhase = "true";
installPhase = ''
install -m444 -Dt $out/share/truetype/Constructium Constructium/Constructium.ttf
'';
meta = {
description = "Fork of SIL Gentium with glyph for Constructed Languages";
license = lib.licenses.ofl;
};
}

View file

@ -0,0 +1,28 @@
{
stdenv,
callPackage,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenv.mkDerivation {
name = "fairfax-hd";
version = source.date;
src = callPackage ./source.nix {};
preferLocalBuild = true;
buildPhase = "true";
installPhase = ''
for variant in HD HaxHD PonaHD SMHD; do
install -m444 -Dt $out/share/truetype/FairfaxHD FairfaxHD/Fairfax$variant.ttf
done
'';
meta = {
description = "Halfwidth scalable monospace font with support for many scripts, including Conscripts";
license = lib.licenses.ofl;
};
passthru.updateScript = [
../../scripts/update-git.sh
"https://gitlab.com/kreativekorp/open-relay.git"
"fonts/kreative/source.json"
];
}

View file

@ -0,0 +1,23 @@
{
stdenv,
callPackage,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenv.mkDerivation {
name = "fairfax";
version = source.date;
src = callPackage ./source.nix {};
preferLocalBuild = true;
buildPhase = "true";
installPhase = ''
for variant in "" Bold Hax HaxBold HaxItalic Italic Pona SM SMBold SMItalic Serif SerifHax SerifSM; do
install -m444 -Dt $out/share/truetype/Fairfax Fairfax/Fairfax$variant.ttf
done
'';
meta = {
description = "6x12 Bitmap Font supporting many Unicode Characters and Constructed Scripts";
license = lib.licenses.ofl;
};
}

View file

@ -0,0 +1,23 @@
{
stdenv,
callPackage,
lib,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
stdenv.mkDerivation {
name = "kreative-square";
version = source.date;
src = callPackage ./source.nix {};
preferLocalBuild = true;
buildPhase = "true";
installPhase = ''
for variant in "" SM; do
install -m444 -Dt $out/share/truetype/KreativeSquare KreativeSquare/$variant.ttf
done
'';
meta = {
description = "Fullwidth scalable monospace font with many Box Drawing characters";
license = lib.licenses.ofl;
};
}

View file

@ -0,0 +1,11 @@
{
"url": "https://gitlab.com/kreativekorp/open-relay.git",
"rev": "cbaca8d9d6d65bddbc05dd3e20b7063639f6664a",
"date": "2022-09-04T21:11:08-07:00",
"path": "/nix/store/3s07242jw2iy6v96fhdnsq6yr3zl8mkv-open-relay",
"sha256": "1k5ymzh73q8pkn8jssiif5p9vm3k84h5nd3m0j9mgb0gf85gapw1",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}

View file

@ -0,0 +1,8 @@
{fetchFromGitLab}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
in
fetchFromGitLab {
owner = "kreativekorp";
repo = "openrelay";
inherit (source) rev sha256;
}