iosevka/flake.nix

63 lines
1.8 KiB
Nix
Raw Normal View History

2024-03-03 20:45:29 +00:00
{
description = "My customised build of Iosevka font";
nixConfig = {
extra-substituters = ["https://nix.xenia.me.uk"];
extra-trusted-public-keys = ["nix.xenia.me.uk:VaQu+8hshk7aSbW3z91pgkKbYeAcO3Q0AomqP8RaaLc="];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = {
self,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;};
customBuildPlan = import ./custom-build-plan.nix;
in {
packages.${system} = {
iosevka-custom-aile = pkgs.iosevka.override {
set = "aile";
privateBuildPlan = {
inherit (customBuildPlan) noCvSs exportGlyphNames variants weights;
family = "Iosevka Custom Aile";
spacing = "quasi-proportional";
serifs = "sans";
};
};
iosevka-custom-etoile = pkgs.iosevka.override {
set = "etoile";
privateBuildPlan = {
inherit (customBuildPlan) noCvSs exportGlyphNames variants weights;
family = "Iosevka Custom Etoile";
spacing = "quasi-proportional";
serifs = "slab";
};
};
iosevka-custom-nerdfont = let
monospace = pkgs.iosevka.override {
set = "custom";
privateBuildPlan = {
inherit (customBuildPlan) noCvSs exportGlyphNames variants weights;
family = "Iosevka Custom";
spacing = "normal";
serifs = "sans";
};
};
in
pkgs.stdenv.mkDerivation {
name = "${monospace.name}-nerd-font-patched";
src = monospace;
nativeBuildInputs = [pkgs.nerd-font-patcher];
buildPhase = ''
find \( -name \*.ttf -o -name \*.otf \) -execdir nerd-font-patcher -c {} \;
'';
installPhase = "cp -a . $out";
};
};
};
}