diff --git a/home/config/nil/founts.nix b/home/config/nil/founts.nix index 9ee3029..25bb154 100644 --- a/home/config/nil/founts.nix +++ b/home/config/nil/founts.nix @@ -30,9 +30,7 @@ in lib.mkIf (osConfig.hardware.graphics.enable or false) { home.packages = with pkgs; [ lato - (self.packages.${pkgs.system}.fira-code.override { - fontFeatures = [ "cv01" "cv06" "onum" "ss01" "ss03" "ss06" "ss07" "ss08" "zero" ]; - }) + self.packages.${pkgs.system}.fira-code mplus-outline-fonts.githubRelease (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) noto-fonts diff --git a/package/fira-code.nix b/package/fira-code.nix index 3511f2b..2d61661 100644 --- a/package/fira-code.nix +++ b/package/fira-code.nix @@ -1,48 +1,20 @@ -{ ... }: { - stdenv, - lib, - fetchFromGitHub, - - python3, - ttfautohint, - - fontFeatures ? [ ] -}: +{ ... }: { stdenv, lib, fetchzip }: stdenv.mkDerivation (finalAttrs: { - __structuredAttrs = true; - pname = "fira-code"; - version = "unstable-2024-02-29"; + version = "unstable-2024-08-27"; - src = fetchFromGitHub { - owner = "tonsky"; - repo = "FiraCode"; - rev = "34cced2a1235e2035fb1f258f228b0ed584b8911"; - hash = "sha256-1cLjAqdm2oG39ML9CuVeoQKb9SR1QX9k7qt2cfl7098="; + src = fetchzip { + url = "https://github.com/illdefined/FiraCode/releases/download/unstable-2024-08-27/Fira_Code_8557c11.zip"; + stripRoot = false; + hash = "sha256-pcxwlqTntP+/tNOX+MPG+YTiSv1odX4fa3zBfJViQGQ="; }; - nativeBuildInputs = [ - (python3.withPackages (ps: with ps; [ fontmake ])) - ttfautohint - ]; - - inherit fontFeatures; - - postPatch = '' - patchShebangs script - ''; - - buildPhase = '' - runHook preBuild - ./script/bake_in_features.sh "''${fontFeatures[@]}" - ./script/build_ttf.sh - runHook postBuild - ''; + dontBuild = true; installPhase = '' runHook preInstall - install -D -m 0644 -t "$out/share/fonts" distr/ttf/Fira\ Code/*.ttf + install -D -m 0644 -t "$out/share/fonts" "variable_ttf/Fira Code/FiraCode-VF.ttf" runHook postInstall ''; })