mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
jetbrains-mono: Use installFonts hook
This commit is contained in:
@@ -2,25 +2,26 @@
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
python313Packages,
|
||||
python3Packages,
|
||||
installFonts,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "jetbrains-mono";
|
||||
version = "2.304";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jetbrains";
|
||||
repo = "jetbrainsmono";
|
||||
rev = "v${version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-SW9d5yVud2BWUJpDOlqYn1E1cqicIHdSZjbXjqOAQGw=";
|
||||
};
|
||||
|
||||
env."PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION" = "python";
|
||||
|
||||
nativeBuildInputs = [
|
||||
# Currently broken on 3.14
|
||||
python313Packages.gftools
|
||||
python3Packages.gftools
|
||||
installFonts
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
@@ -29,21 +30,20 @@ stdenvNoCC.mkDerivation rec {
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm644 -t "$out/share/fonts/opentype/" fonts/otf/*.otf
|
||||
install -Dm644 -t "$out/share/fonts/truetype/" fonts/ttf/*.ttf
|
||||
install -Dm644 -t "$out/share/fonts/truetype/" fonts/variable/*.ttf
|
||||
install -Dm644 -t "$out/share/fonts/WOFF2/" fonts/webfonts/*.woff2
|
||||
runHook postInstall
|
||||
'';
|
||||
# gftools pulls in ninja which we don't need here.
|
||||
dontUseNinjaInstall = true;
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"webfont"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Typeface made for developers";
|
||||
homepage = "https://jetbrains.com/mono/";
|
||||
changelog = "https://github.com/JetBrains/JetBrainsMono/blob/v${version}/Changelog.md";
|
||||
changelog = "https://github.com/JetBrains/JetBrainsMono/blob/v${finalAttrs.src.tag}/Changelog.md";
|
||||
license = lib.licenses.ofl;
|
||||
maintainers = with lib.maintainers; [ vinnymeller ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user