various improvements

This commit is contained in:
zackartz 2024-05-27 03:11:41 -04:00
parent 5e1a70ca49
commit 8de5c50daa
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA
14 changed files with 185 additions and 167 deletions

View file

@ -3,7 +3,9 @@
fetchFromGitHub,
remarshal,
ttfautohint-nox,
nerd-font-patcher,
stdenv,
findutils,
lib,
darwin,
privateBuildPlan ? null,
@ -15,10 +17,10 @@ buildNpmPackage rec {
pname = "zed-mono";
src = fetchFromGitHub {
owner = "zed-industries";
owner = "zackartz";
repo = "zed-fonts";
rev = "${version}";
hash = "sha256-qa683ED5q1LR2pAY0vRuprsHXLz/3IQPp3pFfzRPdQo=";
hash = "sha256-cGtkQ9BDY/nGUf81pwhOcEeLNyARHZMd9a++nw8CAE0=";
};
npmDepsHash = "sha256-M2GmTWEvNv485EdexDZoShuGeRmVvoGFV9EvQR3jE1c=";
@ -27,6 +29,8 @@ buildNpmPackage rec {
[
remarshal
ttfautohint-nox
nerd-font-patcher
findutils
]
++ lib.optionals stdenv.isDarwin [
# libtool
@ -68,6 +72,10 @@ buildNpmPackage rec {
buildPhase = ''
export HOME=$TMPDIR
runHook preBuild
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES --verbose=9 ttf::zed-mono
cd dist/zed-mono/ttf
find . -type f -name "*.ttf" | xargs -P $NIX_BUILD_CORES -I {} nerd-font-patcher -c -s {}
cd ../../../
npm run build --no-update-notifier -- --jCmd=$NIX_BUILD_CORES --verbose=9 ttf::zed-sans
runHook postBuild
'';
@ -77,15 +85,17 @@ buildNpmPackage rec {
fontdir="$out/share/fonts/truetype"
install -d "$fontdir"
install "dist/zed-sans/ttf"/* "$fontdir"
install "dist/zed-mono/ttf"/* "$fontdir"
runHook postInstall
'';
enableParallelBuilding = true;
# this is here because as of 2024-05-27 the offical build doesn't have good ligature support with kitty :/
meta = with lib; {
homepage = "https://zed.dev";
downloadPage = "https://github.com/zed-industries/zed-fonts/releases";
description = "Fonts for Zed Editor, based on Iosevka";
description = "Fonts for Zed Editor, based on Iosevka (with Nerd Font Patches)";
longDescription = ''
Zed Mono & Zed Sans are custom builds of Iosevka liscensed under the SIL Open Font License, Version 1.1.