foot, vintage fonts, scope operator

This commit is contained in:
atagen 2025-08-12 15:47:26 +10:00
parent 8d77e96d89
commit 5575604452
46 changed files with 803 additions and 702 deletions

View file

@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchzip,
style ? "mixed",
baseVersion ? "2.2",
}:
let
styles = builtins.mapAttrs (_: v: lib.escape [ " " "(" ")" ] v) {
"bitmap" = "otb - Bm (linux bitmap)";
"aspect" = "ttf - Ac (aspect-corrected)";
"mixed" = "ttf - Mx (mixed outline+bitmap)";
"pixel" = "ttf - Px (pixel outline)";
};
selectedStyle = styles.${style};
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "oldschool-pc-font-pack";
version = "${baseVersion}-${style}";
src = fetchzip {
name = "oldschool-pc-font-pack-base";
url = "https://int10h.org/oldschool-pc-fonts/download/oldschool_pc_font_pack_v${baseVersion}_linux.zip";
hash = "sha256-54U8tZzvivTSOgmGesj9QbIgkSTm9w4quMhsuEc0Xy4=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
''
+ (
if (style == "bitmap") then
''
install -m644 --target $out/share/fonts/ -D $src/${selectedStyle}/*.otb
''
else
''
install -m644 --target $out/share/fonts/truetype/ -D $src/${selectedStyle}/*.ttf
''
)
+ ''
runHook postInstall
'';
})