fira-code: Use pre‐built variable fount
This commit is contained in:
parent
9b459b30fe
commit
b4ad550973
2 changed files with 9 additions and 39 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue