Miscellaneous updates

Update flake inputs for newer version of Iosevka

Fix lower-chi in build plan: semi-chancery-straight ->
semi-chancery-straight-serifless

Rename default.nix -> derivation.nix

Add Iosevka Etoile back again, simply slab variant of Aile

Move names to separate files so they can be reused in both font
definition and names output of flake
This commit is contained in:
Evie Litherland-Smith 2024-09-25 08:21:59 +01:00
parent db915e9a55
commit 32b1029756
7 changed files with 75 additions and 62 deletions

View file

@ -1,7 +1,9 @@
.PHONY: build copy .PHONY: build copy
build: build:
nix build --max-jobs 1 .#iosevka-custom-aile \ nix build --max-jobs 1 \
.#iosevka-custom-aile \
.#iosevka-custom-etoile \
.#iosevka-custom-nerdfont .#iosevka-custom-nerdfont
copy: build copy: build

View file

@ -1,5 +1,5 @@
{ {
noCvSs = true; noCvSs = false;
exportGlyphNames = false; exportGlyphNames = false;
ligations.inherits = "dlig"; ligations.inherits = "dlig";
weights = { weights = {
@ -42,7 +42,7 @@
lower-delta = "flat-top"; lower-delta = "flat-top";
lower-lambda = "tailed-turn"; lower-lambda = "tailed-turn";
lower-xi = "flat-top"; lower-xi = "flat-top";
lower-chi = "semi-chancery-straight"; lower-chi = "semi-chancery-straight-serifless";
zero = "tall-slashed"; zero = "tall-slashed";
one = "no-base"; one = "no-base";
two = "straight-neck-serifless"; two = "straight-neck-serifless";

View file

@ -1,37 +0,0 @@
{
stdenv,
iosevka,
nerd-font-patcher,
}: let
customBuildPlan = import ./custom-build-plan.nix;
in {
iosevka-custom-aile = iosevka.override {
set = "aile";
privateBuildPlan = {
inherit (customBuildPlan) noCvSs exportGlyphNames variants weights;
family = "Iosevka Custom Aile";
spacing = "quasi-proportional";
serifs = "sans";
};
};
iosevka-custom-nerdfont = let
monospace = iosevka.override {
set = "custom";
privateBuildPlan = {
inherit (customBuildPlan) noCvSs exportGlyphNames variants weights;
family = "Iosevka Custom";
spacing = "normal";
serifs = "sans";
};
};
in
stdenv.mkDerivation {
name = "${monospace.name}-nerd-font-patched";
src = monospace;
nativeBuildInputs = [nerd-font-patcher];
buildPhase = ''
find \( -name \*.ttf -o -name \*.otf \) -execdir nerd-font-patcher -c {} \;
'';
installPhase = "cp -a . $out";
};
}

47
derivation.nix Normal file
View file

@ -0,0 +1,47 @@
{
stdenv,
iosevka,
nerd-font-patcher,
}:
let
custom-build-plan = import ./custom-build-plan.nix;
names = import ./names.nix;
in
{
iosevka-custom-aile = iosevka.override {
set = "aile";
privateBuildPlan = custom-build-plan // {
family = names.iosevka-custom-aile;
spacing = "quasi-proportional";
serifs = "sans";
};
};
iosevka-custom-etoile = iosevka.override {
set = "etoile";
privateBuildPlan = custom-build-plan // {
family = names.iosevka-custom-etoile;
spacing = "quasi-proportional";
serifs = "slab";
};
};
iosevka-custom-nerdfont =
let
monospace = iosevka.override {
set = "custom";
privateBuildPlan = custom-build-plan // {
family = names.iosevka-custom-nerdfont;
spacing = "normal";
serifs = "sans";
};
};
in
stdenv.mkDerivation {
name = "${monospace.name}-nerd-font-patched";
src = monospace;
nativeBuildInputs = [ nerd-font-patcher ];
buildPhase = ''
find \( -name \*.ttf -o -name \*.otf \) -execdir nerd-font-patcher -c {} \;
'';
installPhase = "cp -a . $out";
};
}

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717602782, "lastModified": 1726937504,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", "rev": "9357f4f23713673f310988025d9dc261c20e70c6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -10,22 +10,18 @@
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
}; };
outputs = { outputs =
self, { nixpkgs, ... }:
nixpkgs, let
}: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in { result = pkgs.callPackage ./derivation.nix { };
names = { in
iosevka-custom-aile = "Iosevka Custom Aile"; {
iosevka-custom-nerdfont = "IosevkaCustomNerdFont"; names = import ./names.nix;
}; packages.${system} = {
packages.${system} = let inherit (result) iosevka-custom-aile iosevka-custom-etoile iosevka-custom-nerdfont;
inherit (pkgs.callPackage ./default.nix {}) iosevka-custom-aile iosevka-custom-nerdfont; default = result.iosevka-custom-nerdfont;
in {
inherit iosevka-custom-aile iosevka-custom-nerdfont;
default = iosevka-custom-nerdfont;
}; };
}; };
} }

5
names.nix Normal file
View file

@ -0,0 +1,5 @@
{
iosevka-custom-aile = "Iosevka Custom Aile";
iosevka-custom-etoile = "Iosevka Custom Etoile";
iosevka-custom-nerdfont = "IosevkaCustomNerdFont";
}