Font incoming

This commit is contained in:
Daniel Flanagan 2024-06-01 21:12:10 -05:00
parent 1286e23914
commit afe1bb4809
3 changed files with 26 additions and 8 deletions

View file

@ -17,7 +17,11 @@
}; };
systemPackages = with pkgs; [ systemPackages = with pkgs; [
marksman
markdown-oxide
gnupg gnupg
pinentry-tty
pinentry-curses
]; ];
}; };

View file

@ -1,7 +1,6 @@
{iosevka, ...}: let {iosevka, ...}: let
set = "LyteTerm"; set = "LyteTerm";
in in ((iosevka.override {
(iosevka.override {
inherit set; inherit set;
privateBuildPlan = '' privateBuildPlan = ''
@ -125,7 +124,22 @@ in
''; '';
}) })
.overrideAttrs { .overrideAttrs {
postBuild = '' buildPhase = ''
export HOME=$TMPDIR
runHook preBuild
npm run build --no-update-notifier --targets ttf::$pname -- --jCmd=$NIX_BUILD_CORES --verbose=9
npm run build --no-update-notifier --targets woff2::$pname -- --jCmd=$NIX_BUILD_CORES --verbose=9 npm run build --no-update-notifier --targets woff2::$pname -- --jCmd=$NIX_BUILD_CORES --verbose=9
runHook postBuild
''; '';
}
installPhase = ''
runHook preInstall
ttfontdir="$out/share/fonts/truetype"
wfontdir="$out/share/fonts/woff2"
install -d "$ttfontdir"
install -d "$wfontdir"
install "dist/$pname/TTF"/* "$ttfontdir"
install "dist/$pname/WOFF2"/* "$wfontdir"
runHook postInstall
'';
})

View file

@ -2,15 +2,15 @@
pkgs, pkgs,
parallel, parallel,
python311Packages, python311Packages,
iosevka-lyteterm-raw, iosevkaLyteTerm,
... ...
}: let }: let
BASE_FONTS = "${iosevka-lyteterm-raw}/iosevka-lyteterm"; BASE_FONTS = "${iosevkaLyteTerm}";
in in
pkgs.stdenvNoCC.mkDerivation { pkgs.stdenvNoCC.mkDerivation {
inherit BASE_FONTS; inherit BASE_FONTS;
pname = "iosevka-lyteterm-webmin"; pname = "iosevkaLyteTermWebMin";
version = iosevka-lyteterm-raw.version; version = iosevkaLyteTerm.version;
buildInputs = [parallel] ++ (with python311Packages; [fonttools brotli]); buildInputs = [parallel] ++ (with python311Packages; [fonttools brotli]);
PYTHONPATH = pkgs.python3.withPackages (pp: with pp; [brotli]); PYTHONPATH = pkgs.python3.withPackages (pp: with pp; [brotli]);
srcs = [ srcs = [