Skip to content

Commit

Permalink
jetbrains-mono: build from source
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaralice committed Dec 22, 2024
1 parent ac5066c commit b8e64a0
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions pkgs/by-name/je/jetbrains-mono/package.nix
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
{
lib,
stdenvNoCC,
fetchzip,
fetchFromGitHub,
# python3,
python3Packages,
}:

stdenvNoCC.mkDerivation rec {
pname = "jetbrains-mono";
version = "2.304";

src = fetchzip {
url = "https://github.com/JetBrains/JetBrainsMono/releases/download/v${version}/JetBrainsMono-${version}.zip";
sha256 = "sha256-rv5A3F1zdcUJkmw09st1YxmEIkIoYJaMYGyZjic8jfc=";
stripRoot = false;
src = fetchFromGitHub {
owner = "jetbrains";
repo = "jetbrainsmono";
rev = "v${version}";
hash = "sha256-SW9d5yVud2BWUJpDOlqYn1E1cqicIHdSZjbXjqOAQGw=";
};

dontPatch = true;
dontConfigure = true;
dontBuild = true;
doCheck = false;
dontFixup = true;
nativeBuildInputs = [
python3Packages.gftools
# (python3.withPackages (ps: [ ps.fonttools ] ++ ps.fonttools.optional-dependencies.woff))
];

buildPhase = ''
runHook preBuild
gftools builder sources/config.yaml
# python scripts/generate_variable_webfonts.py
runHook postBuild
'';

installPhase = ''
runHook preInstall
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/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
'';

Expand Down

0 comments on commit b8e64a0

Please sign in to comment.