rhodium-libre, vt323, ostrich-sans, zilla-slab, drafting-mono: use installFonts hook (#525524)

This commit is contained in:
Michael Daniels
2026-06-14 01:01:13 +00:00
committed by GitHub
5 changed files with 29 additions and 34 deletions
+8 -8
View File
@@ -2,11 +2,18 @@
lib,
stdenvNoCC,
fetchFromGitHub,
installFonts,
}:
stdenvNoCC.mkDerivation {
pname = "drafting-mono";
version = "1.1-unstable-2024-06-04";
outputs = [
"out"
"webfont"
];
src = fetchFromGitHub {
owner = "indestructible-type";
repo = "Drafting";
@@ -14,14 +21,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-J64mmDOzTV4MRuZO3MB2SSX5agCRjLDjXAPXuDfdlOM=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp fonts/*/*.otf $out/share/fonts/truetype
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
homepage = "https://indestructibletype.com/Drafting/";
+7 -7
View File
@@ -2,12 +2,18 @@
lib,
fetchFromGitHub,
stdenvNoCC,
installFonts,
}:
stdenvNoCC.mkDerivation {
pname = "ostrich-sans";
version = "2014-04-18";
outputs = [
"out"
"webfont"
];
src = fetchFromGitHub {
owner = "theleagueof";
repo = "ostrich-sans";
@@ -15,13 +21,7 @@ stdenvNoCC.mkDerivation {
hash = "sha256-vvTNtl+fO2zWooH1EvCmO/dPYYgCkj8Ckg5xfg1gtnw=";
};
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/opentype $src/*.otf
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
description = "Gorgeous modern sans-serif with a very long neck";
+2 -8
View File
@@ -2,6 +2,7 @@
lib,
stdenvNoCC,
fetchFromGitHub,
installFonts,
}:
stdenvNoCC.mkDerivation rec {
@@ -15,14 +16,7 @@ stdenvNoCC.mkDerivation rec {
hash = "sha256-YCQvUdjEAj4G71WCRCM0+NwiqRqwt1Ggeg9jb/oWEsY=";
};
installPhase = ''
runHook preInstall
install -Dm444 -t $out/share/fonts/opentype/ RhodiumLibre-Regular.otf
install -Dm444 -t $out/share/fonts/truetype/ RhodiumLibre-Regular.ttf
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
description = "F/OSS/Libre font for Latin and Devanagari";
+5 -3
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
installFonts,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -15,9 +16,10 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-Abq0/hU/BXJMxQxzhZG1SEGIZYt+qofuXwy5/A9byQ8=";
};
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp fonts/ttf/VT323-Regular.ttf $out/share/fonts/truetype
nativeBuildInputs = [ installFonts ];
preInstall = ''
rm -r old
'';
meta = {
+7 -8
View File
@@ -2,26 +2,25 @@
lib,
stdenvNoCC,
fetchzip,
installFonts,
}:
stdenvNoCC.mkDerivation rec {
pname = "zilla-slab";
version = "1.002";
outputs = [
"out"
"webfont"
];
src = fetchzip {
url = "https://github.com/mozilla/zilla-slab/releases/download/v${version}/Zilla-Slab-Fonts-v${version}.zip";
stripRoot = false;
hash = "sha256-yOHu+dSWlyI7w1N1teED9R1Fphso2bKAlYDC1KdqBCc=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp -v zilla-slab/ttf/*.ttf $out/share/fonts/truetype/
runHook postInstall
'';
nativeBuildInputs = [ installFonts ];
meta = {
homepage = "https://github.com/mozilla/zilla-slab";