From 4eaf3d280f184dec7745e1dd3b95d6b0f63620f7 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 16 Mar 2024 11:26:48 +0000 Subject: [PATCH] Move main build logic from flake.nix to default.nix Remove Iosevka Etoile --- default.nix | 37 +++++++++++++++++++++++++++++++++++++ flake.nix | 43 +------------------------------------------ 2 files changed, 38 insertions(+), 42 deletions(-) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..0eeb269 --- /dev/null +++ b/default.nix @@ -0,0 +1,37 @@ +{ + 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"; + }; +} diff --git a/flake.nix b/flake.nix index 2e3fac3..9433c98 100644 --- a/flake.nix +++ b/flake.nix @@ -16,52 +16,11 @@ }: let system = "x86_64-linux"; pkgs = import nixpkgs {inherit system;}; - customBuildPlan = import ./custom-build-plan.nix; in { names = { iosevka-custom-aile = "Iosevka Custom Aile"; - iosevka-custom-etoile = "Iosevka Custom Etoile"; iosevka-custom-nerdfont = "IosevkaCustomNerdFont"; }; - 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"; - }; - }; + packages.${system} = pkgs.callPackage ./default.nix; }; }