This commit is contained in:
Daniel Flanagan 2024-02-02 17:55:55 -06:00
parent 69b372d036
commit a225e6d55d
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
3 changed files with 12 additions and 10 deletions

View file

@ -1,11 +1,11 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
{pkgs, ...}: rec {
iosevka-lyte-term = pkgs.callPackage ./iosevka-lyte-term.nix {inherit (pkgs) iosevka;};
iosevka-lyte-term-min = pkgs.callPackage ./iosevka-lyte-term-min.nix {
iosevka-lyteterm = pkgs.callPackage ./iosevka-lyteterm.nix {inherit (pkgs) iosevka;};
iosevka-lyteterm-min = pkgs.callPackage ./iosevka-lyteterm-min.nix {
inherit pkgs;
inherit (pkgs) brotli;
inherit iosevka-lyte-term;
inherit iosevka-lyteterm;
fonttools = pkgs.python311Packages.fonttools;
};
# example = pkgs.callPackage ./example { };

View file

@ -2,15 +2,15 @@
pkgs,
fonttools,
brotli,
iosevka-lyte-term,
iosevka-lyteterm,
...
}: let
BASE_FONTS = "${iosevka-lyte-term}/share/fonts/truetype";
BASE_FONTS = "${iosevka-lyteterm}/share/fonts/truetype";
in
pkgs.stdenvNoCC.mkDerivation {
inherit BASE_FONTS;
pname = "iosevka-lyte-term-min";
version = iosevka-lyte-term.version;
pname = "iosevka-lyteterm-min";
version = iosevka-lyteterm.version;
# do I need to include makesubset.bash and subset-glyphs.txt?
buildInputs = [fonttools brotli];
srcs = [

View file

@ -1,7 +1,7 @@
{iosevka, ...}:
(iosevka.overrideAttrs
(final: prev: {
pname = "iosevka-lyte-term";
pname = "iosevka-lyteterm";
buildPhase = ''
export HOME=$TMPDIR
@ -14,9 +14,11 @@
installPhase = ''
runHook preInstall
fontdir="$out/share/fonts"
ls -la "$pname"
ls -la "$pname/ttf"/*
install -d "$fontdir"
install "dist/$pname/ttf"/* "$fontdir/truetype"
install "dist/$pname/woff2"/* "$fontdir/woff2"
install "$pname/ttf"/* "$fontdir/truetype"
install "$pname/woff2"/* "$fontdir/woff2"
runHook postInstall
'';
}))