push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
{
fetchFromGitHub,
lib,
stdenv,
fontforge,
perl,
perlPackages,
}:
let
version = "2.37";
meta = {
description = "Typeface family based on the Bitstream Vera fonts";
longDescription = ''
The DejaVu fonts are TrueType fonts based on the BitStream Vera fonts,
providing more styles and with greater coverage of Unicode.
This package includes DejaVu Sans, DejaVu Serif, DejaVu Sans Mono, and
the TeX Gyre DejaVu Math font.
'';
homepage = "https://dejavu-fonts.github.io/";
# Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
# Copyright (c) 2006 by Tavmjong Bah. All Rights Reserved.
# DejaVu changes are in public domain
# See http://dejavu-fonts.org/wiki/License for details
license = lib.licenses.free;
platforms = lib.platforms.all;
};
full-ttf = stdenv.mkDerivation {
pname = "dejavu-fonts-full";
inherit version;
nativeBuildInputs = [
fontforge
perl
perlPackages.IOString
perlPackages.FontTTF
];
src = fetchFromGitHub {
owner = "dejavu-fonts";
repo = "dejavu-fonts";
rev = "version_${lib.replaceStrings [ "." ] [ "_" ] version}";
sha256 = "1xknlg2h287dx34v2n5r33bpcl4biqf0cv7nak657rjki7s0k4bk";
};
buildFlags = [ "full-ttf" ];
preBuild = "patchShebangs scripts";
installPhase = "install -m444 -Dt $out/share/fonts/truetype build/*.ttf";
inherit meta;
};
minimal = stdenv.mkDerivation {
pname = "dejavu-fonts-minimal";
inherit version;
buildCommand = ''
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/DejaVuSans.ttf
'';
inherit meta;
};
in
stdenv.mkDerivation {
pname = "dejavu-fonts";
inherit version;
buildCommand = ''
install -m444 -Dt $out/share/fonts/truetype ${full-ttf}/share/fonts/truetype/*.ttf
ln -s --relative --force --target-directory=$out/share/fonts/truetype ${minimal}/share/fonts/truetype/DejaVuSans.ttf
'';
inherit meta;
passthru = { inherit minimal full-ttf; };
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
let
font-awesome =
{
version,
hash,
rev ? version,
}:
stdenvNoCC.mkDerivation {
pname = "font-awesome";
inherit version;
src = fetchFromGitHub {
owner = "FortAwesome";
repo = "Font-Awesome";
inherit rev hash;
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/opentype {fonts,otfs}/*.otf
runHook postInstall
'';
meta = with lib; {
description = "Font Awesome - OTF font";
longDescription = ''
Font Awesome gives you scalable vector icons that can instantly be customized.
This package includes only the OTF font. For full CSS etc. see the project website.
'';
homepage = "https://fontawesome.com/";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [
abaldeau
johnazoidberg
];
};
};
in
{
# Keeping version 4 and 5 because version 6 is incompatible for some icons. That
# means that projects which depend on it need to actively convert the
# symbols. See:
# https://github.com/greshake/i3status-rust/issues/130
# https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
# https://fontawesome.com/v6/docs/web/setup/upgrade/
v4 = font-awesome {
version = "4.7.0";
rev = "v4.7.0";
hash = "sha256-LL9zWFC+76wH74nqKszPQf2ZDfXq8BiH6tuiK43wYHA=";
};
v5 = font-awesome {
version = "5.15.4";
hash = "sha256-gd23ZplNY56sm1lfkU3kPXUOmNmY5SRnT0qlQZRNuBo=";
};
v6 = font-awesome {
version = "6.7.2";
hash = "sha256-MaJG96kYj8ukJVyqOTDpkHH/eWr/ZlbVKk9AvJM7ub4=";
};
v7 = font-awesome {
version = "7.0.1";
hash = "sha256-ucKE4euZf7teosY+6X0W1wDOdnlW1SRcZhQdBvvOY1s=";
};
}

View File

@@ -0,0 +1,103 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
let
fonts = {
aegan = {
version = "13.00";
file = "Aegean.zip";
hash = "sha256-3HmCqCMZLN6zF1N/EirQOPnHKTGHoc4aHKoZxFYTB34=";
description = "Aegean";
};
aegyptus = {
version = "13.00";
file = "Aegyptus.zip";
hash = "sha256-SSAK707xhpsUTq8tSBcrzNGunCYad58amtCqAWuevnY=";
description = "Egyptian Hieroglyphs, Coptic, Meroitic";
};
akkadian = {
version = "13.00";
file = "Akkadian.zip";
hash = "sha256-wXiDYyfujAs6fklOCqXq7Ms7wP5RbPlpNVwkUy7CV4k=";
description = "Sumero-Akkadian Cuneiform";
};
assyrian = {
version = "13.00";
file = "Assyrian.zip";
hash = "sha256-CZj1sc89OexQ0INb7pbEu5GfE/w2E5JmhjT8cosoLSg=";
description = "Neo-Assyrian in Unicode with OpenType";
};
eemusic = {
version = "13.00";
file = "EEMusic.zip";
hash = "sha256-LxOcQOPEImw0wosxJotbOJRbe0qlK5dR+kazuhm99Kg=";
description = "Byzantine Musical Notation in Unicode with OpenType";
};
maya = {
version = "13.00";
file = "Maya%20Hieroglyphs.zip";
hash = "sha256-PAwF1lGqm6XVf4NQCA8AFLGU40N0Xsn5Q8x9ikHJDhY=";
description = "Maya Hieroglyphs";
};
symbola = {
version = "13.00";
file = "Symbola.zip";
hash = "sha256-TsHWmzkEyMa8JOZDyjvk7PDhm239oH/FNllizNFf398=";
description = "Basic Latin, Greek, Cyrillic and many Symbol blocks of Unicode";
};
textfonts = {
version = "13.00";
file = "Textfonts.zip";
hash = "sha256-7S3NiiyDvyYoDrLPt2z3P9bEEFOEZACv2sIHG1Tn6yI=";
description = "Aroania, Anaktoria, Alexander, Avdira and Asea";
};
unidings = {
version = "13.00";
file = "Unidings.zip";
hash = "sha256-WUY+Ylphep6WuzqLQ3Owv+vK5Yuu/aAkn4GOFXL0uQY=";
description = "Glyphs and Icons for blocks of The Unicode Standard";
};
};
mkpkg =
pname:
{
version,
file,
hash,
description,
}:
stdenvNoCC.mkDerivation rec {
inherit pname version;
src = fetchzip {
url = "https://web.archive.org/web/20221006174450/https://dn-works.com/wp-content/uploads/2020/UFAS-Fonts/${file}";
stripRoot = false;
inherit hash;
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/{fonts/opentype,doc/${pname}}
mv *.otf -t "$out/share/fonts/opentype"
mv *.{odt,ods,pdf,xlsx} -t "$out/share/doc/${pname}" || true # install docs if any
runHook postInstall
'';
meta = {
inherit description;
# see https://web.archive.org/web/20221006174450/https://dn-works.com/wp-content/uploads/2020/UFAS-Docs/License.pdf
# quite draconian: non-commercial, no modifications,
# no redistribution, "a single instantiation and no
# network installation"
license = lib.licenses.unfree;
homepage = "https://web.archive.org/web/20221006174450/https://dn-works.com/ufas/";
};
};
in
lib.mapAttrs mkpkg fonts

View File

@@ -0,0 +1,80 @@
{
lib,
iosevka,
fetchFromGitHub,
buildNpmPackage,
}:
let
sets = [
# Family | Shapes | Spacing | Style | Ligatures |
# ------------------------+--------+---------+------------+-----------|
"comfy" # | Sans | Compact | Monospaced | Yes |
"comfy-fixed" # | Sans | Compact | Monospaced | No |
"comfy-duo" # | Sans | Compact | Duospaced | Yes |
# ------------------------+--------+---------+------------+-----------|
"comfy-motion" # | Slab | Compact | Monospaced | Yes |
"comfy-motion-fixed" # | Slab | Compact | Monospaced | No |
"comfy-motion-duo" # | Slab | Compact | Duospaced | Yes |
# ------------------------+--------+---------+------------+-----------|
"comfy-wide" # | Sans | Wide | Monospaced | Yes |
"comfy-wide-fixed" # | Sans | Wide | Monospaced | No |
"comfy-wide-duo" # | Sans | Wide | Duospaced | Yes |
# ------------------------+--------+---------+------------+-----------|
"comfy-wide-motion" # | Slab | Wide | Monospaced | Yes |
"comfy-wide-motion-fixed" # Slab | Wide | Monospaced | No |
"comfy-wide-motion-duo" # | Slab | Wide | Duospaced | Yes |
];
version = "2.1.0";
src = fetchFromGitHub {
owner = "protesilaos";
repo = "iosevka-comfy";
rev = version;
sha256 = "sha256-z9OlxeD88HuPJF88CsAy3vd1SFpJF1qh5c/0AIeMA7o=";
};
privateBuildPlan = src.outPath + "/private-build-plans.toml";
makeIosevkaFont =
set:
let
superBuildNpmPackage = buildNpmPackage;
in
(iosevka.override {
inherit set privateBuildPlan;
buildNpmPackage =
args:
superBuildNpmPackage (
args
// {
pname = "iosevka-${set}";
inherit version;
src = fetchFromGitHub {
owner = "be5invis";
repo = "iosevka";
rev = "v31.9.1";
hash = "sha256-eAC4afBfHfiteYCzBNGFG2U/oCA7C5CdUlQVSO9Dg6E=";
};
npmDepsHash = "sha256-xwGR21+CpZRFdZYz8SQrSf1tkp3fjGudoMmP5TGgEe8=";
meta = with lib; {
inherit (src.meta) homepage;
description = ''
Customised build of the Iosevka typeface, with a consistent
rounded style and overrides for almost all individual glyphs
in both roman (upright) and italic (slanted) variants.
'';
license = licenses.ofl;
platforms = iosevka.meta.platforms;
maintainers = [ maintainers.DamienCassou ];
};
}
);
});
in
builtins.listToAttrs (
map (set: {
name = set;
value = makeIosevkaFont set;
}) sets
)

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
fetchFromGitHub,
fontforge,
python3,
}:
let
inherit (python3.pkgs) fonttools;
commonNativeBuildInputs = [
fontforge
python3
];
common =
{
version,
repo,
sha256,
docsToInstall,
nativeBuildInputs,
postPatch ? null,
}:
stdenv.mkDerivation rec {
pname = "liberation-fonts";
inherit version;
src = fetchFromGitHub {
owner = "liberationfonts";
rev = version;
inherit repo sha256;
};
inherit nativeBuildInputs postPatch;
installPhase = ''
find . -name '*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \;
for i in ${toString docsToInstall}; do
# not all docs exist in all versions
install -m444 -Dt $out/share/doc/${pname}-${version} $i || true
done
'';
meta = with lib; {
description = "Liberation Fonts, replacements for Times New Roman, Arial, and Courier New";
longDescription = ''
The Liberation Fonts are intended to be replacements for the three most
commonly used fonts on Microsoft systems: Times New Roman, Arial, and
Courier New. Since 2012 they are based on croscore fonts.
There are three sets: Sans (a substitute for Arial, Albany, Helvetica,
Nimbus Sans L, and Bitstream Vera Sans), Serif (a substitute for Times
New Roman, Thorndale, Nimbus Roman, and Bitstream Vera Serif) and Mono
(a substitute for Courier New, Cumberland, Courier, Nimbus Mono L, and
Bitstream Vera Sans Mono).
'';
license = licenses.ofl;
homepage = "https://github.com/liberationfonts";
maintainers = with maintainers; [ raskin ];
};
};
in
{
liberation_ttf_v1 = common {
repo = "liberation-1.7-fonts";
version = "1.07.5";
docsToInstall = [
"AUTHORS"
"ChangeLog"
"COPYING"
"License.txt"
"README"
];
nativeBuildInputs = commonNativeBuildInputs;
sha256 = "1ffl10mf78hx598sy9qr5m6q2b8n3mpnsj73bwixnd4985gsz56v";
};
liberation_ttf_v2 = common {
repo = "liberation-fonts";
version = "2.1.5";
docsToInstall = [
"AUTHORS"
"ChangeLog"
"LICENSE"
"README.md"
];
nativeBuildInputs = commonNativeBuildInputs ++ [ fonttools ];
postPatch = ''
substituteInPlace scripts/setisFixedPitch-fonttools.py --replace \
'font = ttLib.TTFont(fontfile)' \
'font = ttLib.TTFont(fontfile, recalcTimestamp=False)'
'';
sha256 = "Wg1uoD2k/69Wn6XU+7wHqf2KO/bt4y7pwgmG7+IUh4Q=";
};
}

View File

@@ -0,0 +1,144 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
let
fonts = {
assamese = {
label = "Assamese";
version = "2.91.5";
hash = "sha256-Oo/hHHFg/Nu3eaZLMdBclY90lKU2AMFUclyXHxGaAgg=";
};
bengali = {
label = "Bengali";
version = "2.91.5";
hash = "sha256-QGf94TdQS2c9+wSSDK4Mknw5ubCGTuvg0xoNaJdirBc=";
};
devanagari = {
label = "Devanagari script";
version = "2.95.4";
hash = "sha256-6CbOCqOei5eO1zwNQZvB+fFDkqxvJnK82z+zmClhRAE=";
};
gujarati = {
label = "Gujarati";
version = "2.92.4";
hash = "sha256-BpwibF0/HXDvXpDEek0fj73cxo2QC1hSfQ49Q/ZOZg8=";
};
gurmukhi = {
label = "Gurmukhi script";
version = "2.91.2";
hash = "sha256-5iLFW2FEE5LBqoALi+3sUjwC0ADntsp259TP+bYwR9g=";
}; # renamed from Punjabi
kannada = {
label = "Kannada";
version = "2.5.4";
hash = "sha256-7y2u0tBdNYCeY7Y+aqhxXP7Qv6GglJeVO1wvM9CzyIQ=";
};
malayalam = {
label = "Malayalam";
version = "2.92.2";
hash = "sha256-SzM38vuAlP9OMC8kUuHQylmH8TUjCeg1y/Zcu2I2bjA=";
};
marathi = {
label = "Marathi";
version = "2.94.2";
hash = "sha256-jK1Gwcr5gqzRNkbIxs4V/OYgUlUEpU0OYzKDTkiMlqM=";
};
nepali = {
label = "Nepali";
version = "2.94.2";
hash = "sha256-OX1ekxeSbVGOrdbZ3Jvu4nii0zkgbuij10JIzqRcFx4=";
};
odia = {
label = "Odia";
version = "2.91.2";
hash = "sha256-3/eczBGGZj4QPs7KY0as9zk5HaBfhgz6YgU0qmwpVcA=";
}; # renamed from Oriya
tamil-classical = {
label = "Classical Tamil";
version = "2.5.4";
hash = "sha256-6SsddTCEUHMoF7X4+i7eXimmMuktfFAl8uz95RwM+yg=";
};
tamil = {
label = "Tamil";
version = "2.91.3";
hash = "sha256-8lcNw87o9lhQsKwCqwBSfx7rhcrH/eEqac7EsA9/w/E=";
};
telugu = {
label = "Telugu";
version = "2.5.5";
hash = "sha256-cZh93NfEB+5S1JeEowtBMJ0nbZsFGpbEp2WAtzxrA8A=";
};
};
gplfonts = {
# GPL fonts removed from later releases
kashmiri = {
label = "Kashmiri";
version = "2.4.3";
hash = "sha256-6T2QaWnt3+e5nr4vbk44FouqmeWKzia1lSf8S/bvqCs=";
};
konkani = {
label = "Konkani";
version = "2.4.3";
hash = "sha256-hVy2rxrUTPDeNnugi3Bk7z0JqGmk4/yeUsAoI/4R7A8=";
};
maithili = {
label = "Maithili";
version = "2.4.3";
hash = "sha256-ikDcpJqdizAYRpgoebzqxOEeodJ6C3fO2rsqGzC0HCs=";
};
sindhi = {
label = "Sindhi";
version = "2.4.3";
hash = "sha256-wU3B9fh+8E1bFBMnakzmajY7eNKzed9+eYL5AOxyNQI=";
};
};
mkpkg =
license: pname:
{
label,
version,
hash,
}:
stdenvNoCC.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://releases.pagure.org/lohit/lohit-${pname}-ttf-${version}.tar.gz";
inherit hash;
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
cp -v *.ttf $out/share/fonts/truetype/
mkdir -p $out/etc/fonts/conf.d
cp -v *.conf $out/etc/fonts/conf.d
mkdir -p "$out/share/doc/lohit-${pname}"
cp -v ChangeLog* COPYRIGHT* "$out/share/doc/lohit-${pname}/"
runHook postInstall
'';
meta = {
inherit license;
description = "Free and open source fonts for Indian languages (" + label + ")";
homepage = "https://pagure.io/lohit";
maintainers = [
lib.maintainers.mathnerd314
lib.maintainers.ttuegel
];
# Set a non-zero priority to allow easy overriding of the
# fontconfig configuration files.
priority = 5;
};
};
in
# Technically, GPLv2 with usage exceptions
lib.mapAttrs (mkpkg lib.licenses.gpl2) gplfonts // lib.mapAttrs (mkpkg lib.licenses.ofl) fonts

View File

@@ -0,0 +1,148 @@
{
lib,
stdenv,
unzip,
fetchurl,
}:
let
hashes = lib.importJSON ./hashes.json;
maple-font =
{
pname,
hash,
desc,
}:
stdenv.mkDerivation rec {
inherit pname;
version = "7.6";
src = fetchurl {
url = "https://github.com/subframe7536/Maple-font/releases/download/v${version}/${pname}.zip";
inherit hash;
};
# Work around the "unpacker appears to have produced no directories"
# case that happens when the archive doesn't have a subdirectory.
sourceRoot = ".";
nativeBuildInputs = [ unzip ];
installPhase = ''
find . -name '*.ttf' -exec install -Dt $out/share/fonts/truetype {} \;
find . -name '*.otf' -exec install -Dt $out/share/fonts/opentype {} \;
find . -name '*.woff2' -exec install -Dt $out/share/fonts/woff2 {} \;
'';
meta = with lib; {
homepage = "https://github.com/subframe7536/Maple-font";
description = ''
Open source ${desc} font with round corner and ligatures for IDE and command line
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ oluceps ];
};
};
typeVariants = {
truetype = {
suffix = "TTF";
desc = "monospace TrueType";
};
truetype-autohint = {
suffix = "TTF-AutoHint";
desc = "monospace ttf autohint";
};
variable = {
suffix = "Variable";
desc = "monospace variable";
};
woff2 = {
suffix = "Woff2";
desc = "WOFF2.0";
};
opentype = {
suffix = "OTF";
desc = "OpenType";
};
NF = {
suffix = "NF";
desc = "Nerd Font";
};
NF-unhinted = {
suffix = "NF-unhinted";
desc = "Nerd Font unhinted";
};
CN = {
suffix = "CN";
desc = "monospace CN";
};
CN-unhinted = {
suffix = "CN-unhinted";
desc = "monospace CN unhinted";
};
NF-CN = {
suffix = "NF-CN";
desc = "Nerd Font CN";
};
NF-CN-unhinted = {
suffix = "NF-CN-unhinted";
desc = "Nerd Font CN unhinted";
};
};
ligatureVariants = {
No-Ligature = {
suffix = "NL";
desc = "No Ligature";
};
Normal-Ligature = {
suffix = "Normal";
desc = "Normal Ligature";
};
Normal-No-Ligature = {
suffix = "NormalNL";
desc = "Normal No Ligature";
};
};
combinedFonts =
lib.concatMapAttrs (
ligName: ligVariant:
lib.concatMapAttrs (
typeName: typeVariant:
let
pname = "MapleMono${ligVariant.suffix}-${typeVariant.suffix}";
in
{
"${ligVariant.suffix}-${typeVariant.suffix}" = maple-font {
inherit pname;
desc = "${ligVariant.desc} ${typeVariant.desc}";
hash = hashes.${pname};
};
}
) typeVariants
) ligatureVariants
// lib.mapAttrs (
_: value:
let
pname = "MapleMono-${value.suffix}";
in
maple-font {
inherit pname;
inherit (value) desc;
hash = hashes.${pname};
}
) typeVariants;
in
combinedFonts

View File

@@ -0,0 +1,46 @@
{
"MapleMono-CN-unhinted": "sha256-QnjRoW04WvGtgoKVm46U0Z0wImp2YVBdB/8LD37mfWk=",
"MapleMono-CN": "sha256-BF8VP6uZHgyuy/X0iie43jdJ6zyJUCXHlzHt6fOPEEQ=",
"MapleMono-NF-CN-unhinted": "sha256-8PSw/qGYXjpaazyY99bOQFbM+QOkJfizrmll8DTGwq8=",
"MapleMono-NF-CN": "sha256-q3wIvSszhOLyZkqvgvipQ2eEvG9K3Sf2o5hrpHS2vD8=",
"MapleMono-NF-unhinted": "sha256-7KEs6EtgfdO2DZIFGlHAWdIzKqKDaq7aRTG08HEYihw=",
"MapleMono-NF": "sha256-If/kKAFiyOs5NnxXeDOGsLSZRsCdhDmgOtP0SuN96pg=",
"MapleMono-OTF": "sha256-5XsHz8QsruS4oNfwazEfAWXSPr+mX+a5ayUPe5DF/nc=",
"MapleMono-TTF-AutoHint": "sha256-gmBHcBQk8GuWhdVF+TCB23Bh0raB5HVSwHNacVOScWM=",
"MapleMono-TTF": "sha256-n4kivPRcI80jEj7dRX3/SKyWHiBiiXXoY4jEV7eCSSI=",
"MapleMono-Variable": "sha256-8US2XL/RTIeWHatHeLv7/yWib5Vv7rdOyNC5qosRXw0=",
"MapleMono-Woff2": "sha256-f6khGfztBDMX8q7o9VlvLA2YikPoNDqxCf0KVxAR498=",
"MapleMonoNL-CN-unhinted": "sha256-qmtqUCoaWpqGIfIGOBlUU2WIm6vUOUP3S/SyUCCQSSE=",
"MapleMonoNL-CN": "sha256-rs5WcOBR9SYVsCFog6CY04RstSfZmbwo4HuwpeGw/V8=",
"MapleMonoNL-NF-CN-unhinted": "sha256-p8J1tiBXxus2xTvV884QjT8N19vV/uIlz/bCIIGCUp0=",
"MapleMonoNL-NF-CN": "sha256-aDutuElaeOrcKBjNxi096SEylvsSHVe5Fmcj3yoT19M=",
"MapleMonoNL-NF-unhinted": "sha256-fcAQa79JDpxB6A4bAGpY5K9RZhVTmoVnyHx72pRtHxE=",
"MapleMonoNL-NF": "sha256-HZByDLhGkJPDV7t0LXsINLDMYKso19bJD72MiWU/8N4=",
"MapleMonoNL-OTF": "sha256-4zjWL0g7BubP8lVswUe4nPuLHV0rBsAHD/TwmROVXdI=",
"MapleMonoNL-TTF-AutoHint": "sha256-9Q4MdpzfiTZB9QFbH3K2O66hkEQmJdgjPRA1iGG51yc=",
"MapleMonoNL-TTF": "sha256-PM5Dy1lU5MX5nilxHA34x5jBNYp4m8BknJ/aHrprxpY=",
"MapleMonoNL-Variable": "sha256-jvUfLi+DLTCHkdNuKMgcVp49MMeRiVVjwdIVXNKOaYc=",
"MapleMonoNL-Woff2": "sha256-SOCpyCMfXS9atPD2g58dTK67M61rJkoYOIolveCjVYY=",
"MapleMonoNormal-CN-unhinted": "sha256-X6cnYCp2V7pNLxeYE7BmxQncOfes6Vl4TTpONb10xrI=",
"MapleMonoNormal-CN": "sha256-FmZt06ZgRWTRemGMzxkQjU9B26FSQsAFXLc8b/Hv1Ko=",
"MapleMonoNormal-NF-CN-unhinted": "sha256-uRJEJVkcoAyK85V788UU29R9lH9Vuw9RbsrrSEOzdMU=",
"MapleMonoNormal-NF-CN": "sha256-nXENizBJawD/UgrYUNP9mU8m2mt9KH2Sy6vQeXFOmNI=",
"MapleMonoNormal-NF-unhinted": "sha256-qIDYALvHBz8g3V4/jaVAEz5ZIgfNSkLqrVv/AT6pRPM=",
"MapleMonoNormal-NF": "sha256-xWAhVQl9xsKXTJWNCfPBUV6gdHhmf9WUUrAYk2erTM0=",
"MapleMonoNormal-OTF": "sha256-EU4/dvUR68LaM/je41IyXTQyDxroJUTQ6GvkcaTHsSw=",
"MapleMonoNormal-TTF-AutoHint": "sha256-N7DM6nzYRi2zGXMlvc9FmwcWMLvC1bq1AULzsZu0c9E=",
"MapleMonoNormal-TTF": "sha256-HRy0W3srGzO54/VxFk+7q6m0iXFHcii47+Tcxz2RkzI=",
"MapleMonoNormal-Variable": "sha256-CE1XGv0AlbXRW9uRzXKN4pcQHqK4gtoOQyYLM3S4QZo=",
"MapleMonoNormal-Woff2": "sha256-tUvhscxn9r8P8DSJPMRmmUhIB7Owv5fI3fYCYP3CWtg=",
"MapleMonoNormalNL-CN-unhinted": "sha256-XT7cnDJsjNm8OFPqnBWMargcaWo9nl77K+4+DHuYZ4w=",
"MapleMonoNormalNL-CN": "sha256-6okDLMwtXgIiHfSapwKPk7ZKSSxGTBHFzg5STmgTO9Q=",
"MapleMonoNormalNL-NF-CN-unhinted": "sha256-6xQPEAlMjEFb0BaTSqC/4QfCcZYD8uUYMDOgGVFqdrs=",
"MapleMonoNormalNL-NF-CN": "sha256-z1xQa89ex5M4fOnl30Ay0O+eVpuP5644OpRVwE4s8qo=",
"MapleMonoNormalNL-NF-unhinted": "sha256-7BBO3nUUxFf/Nd1CWBukNjGIhc5MmvB8R7B5V0nTJ6I=",
"MapleMonoNormalNL-NF": "sha256-yd8HUSmsTq2RdTNaK0gkh8WpPfuf93vMUD9SZOU415s=",
"MapleMonoNormalNL-OTF": "sha256-nNbOJeqWG55IXWmShMMb2YTrjQe5Yz5A0y2zwwV9irI=",
"MapleMonoNormalNL-TTF-AutoHint": "sha256-/Dpk7Hb7h/VCU5dHR8AyVrrJTGNHHB6OMY85eJNhMhU=",
"MapleMonoNormalNL-TTF": "sha256-ydFuYEgK8o57s67lK1ZAxwTBpuM7fHFGZamQh7YmZcI=",
"MapleMonoNormalNL-Variable": "sha256-KcWDxyp2/kdehiL3/eE1I33so+pR7iFl4zSsKSygsWE=",
"MapleMonoNormalNL-Woff2": "sha256-f5MaDdfaBgxeR0rGlBr6LrCqyPalZjc2ffUVarD24aw="
}

View File

@@ -0,0 +1,61 @@
import sys
import re
import json
import base64
import argparse
import requests
from urllib.parse import urlparse
def process_github_release(url, token=None):
parsed = urlparse(url)
path_parts = parsed.path.strip('/').split('/')
if len(path_parts) < 5 or parsed.netloc != 'github.com':
raise ValueError("Invalid GitHub release URL format")
owner, repo, _, _, tag = path_parts[:5]
headers = {"Accept": "application/vnd.github.v3+json"}
if token:
headers["Authorization"] = f"Bearer {token}"
response = requests.get(
f"https://api.github.com/repos/{owner}/{repo}/releases/tags/{tag}",
headers=headers
)
if response.status_code != 200:
raise RuntimeError(f"Failed to fetch release info: {response.status_code} ({response.json().get('message')})")
release_data = response.json()
assets = release_data.get('assets', [])
result = {}
sha256_pattern = re.compile(r"^[a-fA-F0-9]{64}$")
for asset in assets:
if not asset['name'].endswith('.sha256'):
continue
download_url = asset['browser_download_url']
content_response = requests.get(download_url, headers=headers)
if content_response.status_code != 200:
raise RuntimeError(
f"Failed to download {asset['name']}: "
f"{content_response.status_code} {content_response.text}"
)
hex_hash = content_response.text.strip()
if not sha256_pattern.match(hex_hash):
raise ValueError(f"Invalid SHA256 format in {asset['name']}")
try:
byte_data = bytes.fromhex(hex_hash)
base64_hash = base64.b64encode(byte_data).decode('utf-8')
except Exception as e:
raise RuntimeError(f"Error processing {asset['name']}: {str(e)}")
filename = asset['name'][:-7]
result[filename] = f"sha256-{base64_hash}"
output_file = f"{repo}_{tag}_hashes.json"
with open(output_file, 'w', encoding='utf-8') as f:
json.dump(result, f, indent=2, ensure_ascii=False)
print(f"Successfully generated {output_file}")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Process GitHub release hashes')
parser.add_argument('url', help='GitHub release URL')
parser.add_argument('-t', '--token', help='GitHub API token (optional)')
args = parser.parse_args()
try:
process_github_release(args.url, args.token)
except Exception as e:
print(f"Error: {str(e)}")
sys.exit(1)

View File

@@ -0,0 +1,67 @@
{
lib,
stdenvNoCC,
fetchurl,
fetchFromGitHub,
}:
let
pname = "mplus-outline-fonts";
in
{
osdnRelease = stdenvNoCC.mkDerivation {
pname = "${pname}-osdn";
version = "063a";
src = fetchurl {
url = "mirror://osdn/mplus-fonts/62344/mplus-TESTFLIGHT-063a.tar.xz";
hash = "sha256-ROuXO0tq/1dN5FTbEF3cI+Z0nCKUc0vZyx4Nc05M3Xk=";
};
installPhase = ''
runHook preInstall
install -m444 -Dt $out/share/fonts/truetype/${pname} *.ttf
runHook postInstall
'';
meta = with lib; {
description = "M+ Outline Fonts (legacy OSDN release)";
homepage = "https://mplus-fonts.osdn.jp";
maintainers = with maintainers; [ uakci ];
platforms = platforms.all;
license = licenses.mplus;
};
};
githubRelease = stdenvNoCC.mkDerivation {
pname = "${pname}-github";
version = "unstable-2022-05-19";
src = fetchFromGitHub {
owner = "coz-m";
repo = "MPLUS_FONTS";
rev = "336fec4e9e7c1e61bd22b82e6364686121cf3932";
hash = "sha256-jzDDUs1dKjqNjsMeTA2/4vm+akIisnOuE2mPQS7IDSA=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/{truetype,opentype}/${pname}
mv fonts/ttf/* $out/share/fonts/truetype/${pname}
mv fonts/otf/* $out/share/fonts/opentype/${pname}
runHook postInstall
'';
meta = with lib; {
description = "M+ Outline Fonts (GitHub release)";
homepage = "https://mplusfonts.github.io";
maintainers = with maintainers; [ uakci ];
platforms = platforms.all;
license = licenses.ofl;
};
};
}

View File

@@ -0,0 +1,28 @@
lib:
let
ls = lib.licenses;
in
licenseString:
builtins.getAttr licenseString (
(
with builtins;
lib.trivial.pipe (attrValues ls) [
(filter (l: l ? spdxId))
(map (l: lib.attrsets.nameValuePair l.spdxId l))
listToAttrs
]
)
// {
"Bitstream-Vera AND MIT" = with ls; [
bitstreamVera
mit
];
"LicenseRef-Monofur" = ls.free; # upstream `src/unpatched-fonts/Monofur/LICENSE.txt`
"LicenseRef-UbuntuFont" = ls.ufl;
"LicenseRef-VicFieger" = ls.free; # upstream `src/unpatched-fonts/HeavyData/Vic Fieger License.txt`
"MIT OR OFL-1.1-no-RFN" = ls.mit;
"OFL-1.1-RFN" = ls.ofl;
"OFL-1.1-no-RFN or LGPL-2.1-only" = ls.ofl;
"OFL-1.1-no-RFN" = ls.ofl;
}
)

View File

@@ -0,0 +1,103 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
let
releaseInfo = lib.trivial.importJSON ./manifests/release.json;
fontsInfo = lib.trivial.importJSON ./manifests/fonts.json;
checksums = lib.trivial.importJSON ./manifests/checksums.json;
releaseVersion = lib.removePrefix "v" releaseInfo.tag_name;
convertAttrName =
name:
let
lowerName = lib.strings.toLower name;
in
if builtins.match "^[[:digit:]].*" lowerName != null then "_" + lowerName else lowerName;
convertVersion =
version: if builtins.match "^[[:digit:]].*" version != null then "+" + version else "";
convertLicense = import ./convert-license.nix lib;
makeNerdFont =
{
caskName,
description,
folderName,
licenseId,
patchedName,
version,
...
}:
stdenvNoCC.mkDerivation {
pname = "nerd-fonts-" + lib.strings.toLower caskName;
version = releaseVersion + convertVersion version;
src =
let
filename = folderName + ".tar.xz";
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/${releaseInfo.tag_name}/${filename}";
sha256 = checksums.${filename};
in
fetchurl {
inherit url sha256;
};
sourceRoot = ".";
installPhase =
let
dirName = lib.strings.concatStrings (lib.strings.splitString " " patchedName);
in
''
runHook preInstall
dst_opentype=$out/share/fonts/opentype/NerdFonts/${dirName}
dst_truetype=$out/share/fonts/truetype/NerdFonts/${dirName}
find -name \*.otf -exec mkdir -p $dst_opentype \; -exec cp -p {} $dst_opentype \;
find -name \*.ttf -exec mkdir -p $dst_truetype \; -exec cp -p {} $dst_truetype \;
runHook postInstall
'';
passthru = {
inherit releaseVersion;
updateScript = {
command = ./update.py;
supportedFeatures = [ "commit" ];
};
};
meta = {
description = "Nerd Fonts: " + description;
license = lib.unique (
(with lib.licenses; [
# > Nerd Fonts source fonts, patched fonts, and folders with explicit OFL SIL files
ofl
# > Nerd Fonts original source code files (such as `.sh`, `.py`, `font-patcher` and others)
mit
])
++ lib.toList (convertLicense licenseId)
);
homepage = "https://nerdfonts.com/";
changelog = "https://github.com/ryanoasis/nerd-fonts/blob/${releaseInfo.tag_name}/changelog.md";
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
doronbehar
rc-zb
];
};
};
nerdFonts = lib.trivial.pipe fontsInfo [
(map (font: lib.nameValuePair (convertAttrName font.caskName) (makeNerdFont font)))
builtins.listToAttrs
];
in
nerdFonts

View File

@@ -0,0 +1,72 @@
{
"0xProto.tar.xz": "effaa4c257c1f25e6d2d50679e9b845eab36b346dea9ee26f4405da1a21e6428",
"3270.tar.xz": "6d9dd76987968e8a0b30d3ae4d18b8139d6ddf6cd53409272dbc596654ea38b1",
"AdwaitaMono.tar.xz": "39b7598b2ec30111d1ace82b274809e5d0930e241683c1c91f5b4c7e64a975cf",
"Agave.tar.xz": "fe4879b0cff2d33d7fb08d1c8ba4e0cad9f44843644fe284fda1e89addf9c4ab",
"AnonymousPro.tar.xz": "7ebace54eda35943062eaad9dd4f16de24390b672f31bff45475b82acb1955c0",
"Arimo.tar.xz": "006464de19502bd49a72265058811665b62b823509bbbd2e7181ba87046b6b08",
"AtkinsonHyperlegibleMono.tar.xz": "8643ab571f547c6af0352a08e617ba7303965b2882ab9f36d61e8d4680761a59",
"AurulentSansMono.tar.xz": "a0d642ace8f9d616a9c9cbbe46e188c60ddf7486b0cf2685a3558e06aba2c284",
"BigBlueTerminal.tar.xz": "9df627ec74a21f4da8df4821dba85cabcc452f95b636e8802eeaa2e6f3129e13",
"BitstreamVeraSansMono.tar.xz": "59162ab2d67d39827e497beda03fbe6327d3535d2ee3b1dd7050fdeafe1f9c36",
"CascadiaCode.tar.xz": "804b3d311665a059140466fe142cc76cf14ef0695b7c4d3a174f7f8fba46b6e3",
"CascadiaMono.tar.xz": "7c22db8c8460ef62abffbb6d5c7b212507de0798a4a762fa2a005a8bc4c90fc6",
"CodeNewRoman.tar.xz": "2db8def7863ea49b6ef69f353988d7e0f73a8646722e5946932740d76eb46b25",
"ComicShannsMono.tar.xz": "23d90d18dae663b7d0dcdb4edd2f5087eecb40b00f046a1f46a9abf3ecb47651",
"CommitMono.tar.xz": "44cdabae7708de3548fdd78ed59cdbb1fedbca18e16644047ed4a23623a530ca",
"Cousine.tar.xz": "63bc50fc2b88897096626cf9e835d4237ee0052f9bfd902dc1f5304c693c32e6",
"D2Coding.tar.xz": "5b4e8c53599ee79067a4439bfbf31bb3f1b40e93ac6493f718b48feaf972173d",
"DaddyTimeMono.tar.xz": "854c8cbf59e1fcc48f114408d93f63cad70c6ba8eefad5bf3071bd9dd8ef48f8",
"DejaVuSansMono.tar.xz": "0e58ff9c1f9378922b7f324fdba953929d88d61b36aedd80ee43964567b226cc",
"DepartureMono.tar.xz": "f099f71bc240fb59ffeaba50d26206b32df7e54051e49d6837a1702e4d3b4f3f",
"DroidSansMono.tar.xz": "43ad0a4e238ad078300d0aa2ebca5f7aaf6ff2cdb25c5cfe8191b79aab7d0af2",
"EnvyCodeR.tar.xz": "b631d34ab3e3e26aba7169b382d573d82bc6647d3ddae67e9ce28481f64715e7",
"FantasqueSansMono.tar.xz": "462b5490475fb8560dded4eb6cdd9cfd0049b800acee329094def095557d0ffd",
"FiraCode.tar.xz": "d83fb093e0e05a531cd6f19886a6ceb884a4fa5ea3b53cf099fc1f30c5b3e47d",
"FiraMono.tar.xz": "2e4adc97fefdfa2ad70a6e6e79bc0418acd401a305bcb5fcd848a84e03e35a74",
"GeistMono.tar.xz": "43ef3d73cadddea5be746e20c9f27fbaa59ceb106b8b26f7245ba2de2e46b1f6",
"Go-Mono.tar.xz": "81c879e6a86dd6e6cb94d7a73322bf39f06b3294a727effb5a5bb5c7f9274fd6",
"Gohu.tar.xz": "458b08f1216c18a46fc3e00701d6d171a4d536192b0885c041d8cc1befb6b44d",
"Hack.tar.xz": "1d00a1435638084174516975840854368a45ac30bb0bad2c0c49db713b5925f0",
"Hasklig.tar.xz": "e82418895a7036158baf9a425faea7de1fe332267b218341eec44c6b5071d1ad",
"HeavyData.tar.xz": "ed0d49911ae0caa1d625ae64832b49b4c94e90fa2ec0b1e5e7df440ccb28698b",
"Hermit.tar.xz": "206ae23c386dcb84a2dfaca678af36123fbaff1fb402326021973485018467f3",
"IBMPlexMono.tar.xz": "95e6ecaa5dfb9a96f27a6b6edc7be396fb6df30bc311a6f7e15cad56a30051c2",
"Inconsolata.tar.xz": "47df94d3826a9f3e94b4c596a78f5baaddfb27f25bdb7906c5cf65caf8962eb2",
"InconsolataGo.tar.xz": "0407ab5ddd9f6a9af5f178d5fa1732cbf8275c4fe6e03793adbe48bfd6c04884",
"InconsolataLGC.tar.xz": "59b5961b83f0fd64ef579099ca0209dd706d5025feac813c80fcc2d0648d717f",
"IntelOneMono.tar.xz": "9d55174210a512c6c9d0601532033d05d9e8817c760cb9ccca3c6c9c4ff6d7c1",
"Iosevka.tar.xz": "213ee24cda99ca84d0a8326de133e7e8b2baf9ba23659ce829f589f771d357d2",
"IosevkaTerm.tar.xz": "cad9da572d25e3413f7a15a319d2f3c9e7e915ee016baa99e0d88fc08cf5b781",
"IosevkaTermSlab.tar.xz": "8990ca82b481a02734cb96f46db789716735ca8f6c4bf89d800899a593a1f0ca",
"JetBrainsMono.tar.xz": "ef552a3e638f25125c6ad4c51176a6adcdce295ab1d2ffacf0db060caf8c1582",
"Lekton.tar.xz": "2a7fa12bf2b376307c9ca2501227b0d91dcae25c453ec095e5f768a2ca5b6fe9",
"LiberationMono.tar.xz": "64a9519dd6b75179a9363f9c8a0cefe2984ec8578394ced66e9d0fffd2be922f",
"Lilex.tar.xz": "1d011e82a59aec26bff5564ca90a8e51636364e5b7f79417708aa2c846c633b3",
"MPlus.tar.xz": "9c03e388d0ff2e0bc28be9bf6ab95f1e0260c5828b3159b18867a9e7a1f17f7b",
"MartianMono.tar.xz": "e12f5ca02756268e794d06d9cb2ada93d021ec915f5a43ec2cd77355022f3624",
"Meslo.tar.xz": "a57936d96aefb5cfff0660f3294210ee04705529af6cf811e2274b0923a03939",
"Monaspace.tar.xz": "5fdb97828e1a23fd28ea5ed0e7d15cdebb77ef079aaa48b93f1526764b40ef8c",
"Monofur.tar.xz": "539dc64f089b189c5f14ee60df6368742cc63ccc3be753bd3c8bfba7632fe068",
"Monoid.tar.xz": "5c6efd6fe2f2856d5294748dc751770d1c8889665f42687a0ac8f1b3a86a3299",
"Mononoki.tar.xz": "5c9b3035d45aabfe1fb3ce5e3028130043398cecc1409b20fe8273692192726e",
"NerdFontsSymbolsOnly.tar.xz": "7f8c090da3b0eaa7108646bf34cbbb6ed13d5358a72460522108b06c7ecd716a",
"Noto.tar.xz": "e28b31609d17fc50bdf9e6730c947a61b0e474af726c2c044c39bc78fcd9bfde",
"OpenDyslexic.tar.xz": "2155e95e9c7b12d785dc589033290a8caff07c11cf1697ec3ad0bda37e3b0433",
"Overpass.tar.xz": "4d6d7e8b91840bb2b18bc7ac427f979183e68b6b061db58b4139ad5679bdc36f",
"ProFont.tar.xz": "c6d595ac9f7e0d6ac87c4c57e26c7515c544e8e5ac553c5a215394d12b201a8f",
"ProggyClean.tar.xz": "910c51cb06ff3233daee1d045e606ed77c290ea25dd1a54378e0517601f4785c",
"Recursive.tar.xz": "a047ac2e724c1614ef4350af83f35cd1d044d8d20e6477c319172b860b19329a",
"RobotoMono.tar.xz": "4bc63bf0105c664e466e62cb2fd1c143b310877de93dc35b3b5d48e0e4cb6702",
"ShareTechMono.tar.xz": "11bb01a73894f932a3702551245aa0c57d121ebf59dd293fac5ceac81af822d1",
"SourceCodePro.tar.xz": "d52d97b66c4c5d6d9d99c88df55148faf39738f244485026f22f8e47407744f4",
"SpaceMono.tar.xz": "d159c6f13291723f1821d1064a7d3e0933d96297d55bab27d76861472af68111",
"Terminus.tar.xz": "e857b18a99701528f873275b6012792caf6e30c34c512ee92cda51520140054f",
"Tinos.tar.xz": "c54f03f38fbf897f34235bc5989500361251f61220cf63afedd730edd221714e",
"Ubuntu.tar.xz": "534bf0ffb311a993fd23666a7f3e4f4a0cfc0662abfa8b81594705cceefb69e3",
"UbuntuMono.tar.xz": "a13cf890ef10517c59e812ced167245f2db47d37d2b03c9fb43ddef023a3e776",
"UbuntuSans.tar.xz": "0a399b03565c577ae2da9f8362e6276b0adb13bac288e49fec085c517243e27b",
"VictorMono.tar.xz": "67bb8c729aedbe2e0258435c78e52bb1753618a1d3d7c0c94e6f1c47763a56a9",
"ZedMono.tar.xz": "7dfff6bb0e45143c33703c3fdf3ff77b00f3617fef29671c7ff6af166dcf31a0",
"iA-Writer.tar.xz": "0156f309d942d9066a83005dd42588719a1755fb78e345e5f22ff582da46211b"
}

View File

@@ -0,0 +1,562 @@
[
{
"caskName": "0xproto",
"description": "A programming font focused on source code legibility",
"folderName": "0xProto",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "0xProto",
"version": "2.300"
},
{
"caskName": "3270",
"description": "Derived from the x3270 font, a modern format of a font with high nostalgic value",
"folderName": "3270",
"licenseId": "BSD-3-Clause",
"patchedName": "3270",
"version": "3.0.1"
},
{
"caskName": "adwaita-mono",
"description": "The monospace typeface for GNOME",
"folderName": "AdwaitaMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "AdwaitaMono",
"version": "32.4"
},
{
"caskName": "agave",
"description": "A small, monospace, outline font that is geometrically regular and simple",
"folderName": "Agave",
"licenseId": "MIT",
"patchedName": "Agave",
"version": "37"
},
{
"caskName": "anonymice",
"description": "Inspired by Anonymous 9 on Macintosh, since 2009, distinct `O`, `0`, `I`, `l`, `1`",
"folderName": "AnonymousPro",
"licenseId": "OFL-1.1-RFN",
"patchedName": "AnonymicePro",
"version": "1.002"
},
{
"caskName": "arimo",
"description": "Metrically similar to Arial, pan-European WGL character set, sans serif",
"folderName": "Arimo",
"licenseId": "Apache-2.0",
"patchedName": "Arimo",
"version": "1.33"
},
{
"caskName": "atkynson-mono",
"description": "A monospaced font designed to improve legibility and readability for individuals with low vision",
"folderName": "AtkinsonHyperlegibleMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "AtkynsonMono",
"version": "2.001"
},
{
"caskName": "aurulent-sans-mono",
"description": "Sans serif, designed by Stephen G. Hartke which also created Verily Serif",
"folderName": "AurulentSansMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "AurulentSansM",
"version": "-"
},
{
"caskName": "bigblue-terminal",
"description": "Nostalgic, closely based on IBM's 8x14 EGA/VGA charset",
"folderName": "BigBlueTerminal",
"licenseId": "CC-BY-SA-4.0",
"patchedName": "BigBlueTerm",
"version": "-"
},
{
"caskName": "bitstream-vera-sans-mono",
"description": "Dotted zero, compact lowercase characters",
"folderName": "BitstreamVeraSansMono",
"licenseId": "Bitstream-Vera",
"patchedName": "BitstromWera",
"version": "1.1"
},
{
"caskName": "blex-mono",
"description": "It's global, it's versatile and it's distinctly IBM",
"folderName": "IBMPlexMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "BlexMono",
"version": "2.004 (6.4.0)"
},
{
"caskName": "caskaydia-cove",
"description": "A fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal",
"folderName": "CascadiaCode",
"licenseId": "OFL-1.1-RFN",
"patchedName": "CaskaydiaCove",
"version": "2407.24"
},
{
"caskName": "caskaydia-mono",
"description": "Like Cascadia Code but without any ligatures",
"folderName": "CascadiaMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "CaskaydiaMono",
"version": "2407.24"
},
{
"caskName": "code-new-roman",
"description": "Tunable, slashed zeros, compact smaller characters",
"folderName": "CodeNewRoman",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "CodeNewRoman",
"version": "2.0"
},
{
"caskName": "comic-shanns-mono",
"description": "The very typeface youve been trained to recognize since childhood",
"folderName": "ComicShannsMono",
"licenseId": "MIT",
"patchedName": "ComicShannsMono",
"version": "1.3.1"
},
{
"caskName": "commit-mono",
"description": "An anonymous and neutral programming typeface",
"folderName": "CommitMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "CommitMono",
"version": "1.143"
},
{
"caskName": "cousine",
"description": "Similar to Courier New with better readablitiy, dotted zeros",
"folderName": "Cousine",
"licenseId": "Apache-2.0",
"patchedName": "Cousine",
"version": "1.211"
},
{
"caskName": "d2coding",
"description": "A coding font for Koreans. This is the variant with ligatures.",
"folderName": "D2Coding",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "D2CodingLigature",
"version": "1.3.2"
},
{
"caskName": "daddy-time-mono",
"description": "A monospaced font for programmers and other terminal groupies",
"folderName": "DaddyTimeMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "DaddyTimeMono",
"version": "1.2.3"
},
{
"caskName": "dejavu-sans-mono",
"description": "Dotted zero, based on the Bitstream Vera Fonts with a wider range of character",
"folderName": "DejaVuSansMono",
"licenseId": "Bitstream-Vera",
"patchedName": "DejaVuSansM",
"version": "2.37"
},
{
"caskName": "departure-mono",
"description": "A monospaced pixel font with a lo-fi, techy vibe",
"folderName": "DepartureMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "DepartureMono",
"version": "1.422"
},
{
"caskName": "droid-sans-mono",
"description": "Good for small screens or font sizes",
"folderName": "DroidSansMono",
"licenseId": "Apache-2.0",
"patchedName": "DroidSansM",
"version": "1.00-113"
},
{
"caskName": "envy-code-r",
"description": "Fully-scalable monospaced font designed for programming and command prompts",
"folderName": "EnvyCodeR",
"licenseId": "OFL-1.1-RFN",
"patchedName": "EnvyCodeR",
"version": "0.79"
},
{
"caskName": "fantasque-sans-mono",
"description": "\"Wibbly-wobbly handwriting-like fuzziness\", takes some inspiration from Inconsolata and Monaco",
"folderName": "FantasqueSansMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "FantasqueSansM",
"version": "1.8.0"
},
{
"caskName": "fira-code",
"description": "Programming ligatures, extension of Fira Mono font, enlarged operators",
"folderName": "FiraCode",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "FiraCode",
"version": "6.2"
},
{
"caskName": "fira-mono",
"description": "Mozilla typeface, dotted zero",
"folderName": "FiraMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "FiraMono",
"version": "3.206"
},
{
"caskName": "geist-mono",
"description": "Monospaced typeface designed to be used in code editors, diagrams, terminals, and other textbased interfaces where code is represented",
"folderName": "GeistMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "GeistMono",
"version": "1.401"
},
{
"caskName": "go-mono",
"description": "Created specifically for the Go project, looks particularly clear for use with the Go language",
"folderName": "Go-Mono",
"licenseId": "BSD-3-Clause-Clear",
"patchedName": "GoMono",
"version": "2.010"
},
{
"caskName": "gohufont",
"description": "Bitmap font, tall capitals and ascenders, small serifs",
"folderName": "Gohu",
"licenseId": "WTFPL",
"patchedName": "GohuFont",
"version": "2.0"
},
{
"caskName": "hack",
"description": "Dotted zero, short descenders, expands upon work done for Bitstream Vera & DejaVu, legible at common sizes",
"folderName": "Hack",
"licenseId": "Bitstream-Vera AND MIT",
"patchedName": "Hack",
"version": "3.003"
},
{
"caskName": "hasklug",
"description": "Monospaced ligatures, makes composite glyphs (e.g. ->) more reabable, especially in Haskell",
"folderName": "Hasklig",
"licenseId": "OFL-1.1-RFN",
"patchedName": "Hasklug",
"version": "1.2"
},
{
"caskName": "heavy-data",
"description": "Novel and unique design, dotted zero",
"folderName": "HeavyData",
"licenseId": "LicenseRef-VicFieger",
"patchedName": "HeavyData",
"version": "1"
},
{
"caskName": "hurmit",
"description": "Symbols stand out from common text",
"folderName": "Hermit",
"licenseId": "OFL-1.1-RFN",
"patchedName": "Hurmit",
"version": "2.0"
},
{
"caskName": "im-writing",
"description": "A heavy modification of IBM's Plex font",
"folderName": "iA-Writer",
"licenseId": "OFL-1.1-RFN",
"patchedName": "iMWriting",
"version": "Dec 2018"
},
{
"caskName": "inconsolata",
"description": "Slashed zero, takes inspiration from many different fonts and glyphs, subtle curves in lowercase",
"folderName": "Inconsolata",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Inconsolata",
"version": "3.000"
},
{
"caskName": "inconsolata-go",
"description": "Inconsolata with straight quotes",
"folderName": "InconsolataGo",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "InconsolataGo",
"version": "1.013"
},
{
"caskName": "inconsolata-lgc",
"description": "Inconsolata with added the Cyrillic alphabet",
"folderName": "InconsolataLGC",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Inconsolata LGC",
"version": "1.13"
},
{
"caskName": "intone-mono",
"description": "Expressive monospaced font family thats built with clarity, legibility, and the needs of developers in mind",
"folderName": "IntelOneMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "IntoneMono",
"version": "1.4.0"
},
{
"caskName": "iosevka",
"description": "Narrow and horizontally tight characters, slashed zero",
"folderName": "Iosevka",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Iosevka",
"version": "33.2.1"
},
{
"caskName": "iosevka-term",
"description": "A narrower variant focusing terminal uses: Arrows and geometric symbols will be narrow to follow typical terminal usages",
"folderName": "IosevkaTerm",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "IosevkaTerm",
"version": "33.2.1"
},
{
"caskName": "iosevka-term-slab",
"description": "Nice as Iosevka but with slab serifs",
"folderName": "IosevkaTermSlab",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "IosevkaTermSlab",
"version": "33.2.1"
},
{
"caskName": "jetbrains-mono",
"description": "JetBrains officially created font for developers",
"folderName": "JetBrainsMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "JetBrainsMono",
"version": "2.304"
},
{
"caskName": "lekton",
"description": "Very light and thin characters, sharp m's, `0` and `O` very similar",
"folderName": "Lekton",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Lekton",
"version": "34"
},
{
"caskName": "liberation",
"description": "`0` and `O` very similar, very short tight descenders",
"folderName": "LiberationMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "LiterationMono",
"version": "2.1.5"
},
{
"caskName": "lilex",
"description": "Modern with ligatures",
"folderName": "Lilex",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Lilex",
"version": "2.600"
},
{
"caskName": "martian-mono",
"description": "Free and open-source monospaced font from Evil Martians",
"folderName": "MartianMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "MartianMono",
"version": "1.1.0"
},
{
"caskName": "meslo-lg",
"description": "Slashed zeros, customized version of Apple's Menlo",
"folderName": "Meslo",
"licenseId": "Apache-2.0",
"patchedName": "MesloLG",
"version": "1.21"
},
{
"caskName": "monaspace",
"description": "Five matching fonts all having 'texture healing' to improve legibility",
"folderName": "Monaspace",
"licenseId": "OFL-1.1-RFN",
"patchedName": "Monaspice",
"version": "1.200"
},
{
"caskName": "monofur",
"description": "Dotted zeros, slightly exaggerated curvy characters, compact characters",
"folderName": "Monofur",
"licenseId": "LicenseRef-Monofur",
"patchedName": "Monofur",
"version": "1.0"
},
{
"caskName": "monoid",
"description": "Ligatures, distinguishable glyphs with short ascenders & descenders, large operators & punctuation",
"folderName": "Monoid",
"licenseId": "MIT OR OFL-1.1-no-RFN",
"patchedName": "Monoid",
"version": "0.61"
},
{
"caskName": "mononoki",
"description": "Keeps in mind differentiation of characters and resolution sizes",
"folderName": "Mononoki",
"licenseId": "OFL-1.1-RFN",
"patchedName": "Mononoki",
"version": "1.6"
},
{
"caskName": "m+",
"description": "Multiple styles and weights, many glyph sets (e.g. Kana glyphs)",
"folderName": "MPlus",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "M+",
"version": "1.007"
},
{
"caskName": "noto",
"description": "`0` and `O` very similar, characters are either very curvy or straight lined",
"folderName": "Noto",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "Noto",
"version": "div"
},
{
"caskName": "open-dyslexic",
"description": "Designed specifically to alleviate reading errors caused by dyslexia",
"folderName": "OpenDyslexic",
"licenseId": "Bitstream-Vera",
"patchedName": "OpenDyslexic",
"version": "2.001"
},
{
"caskName": "overpass",
"description": "An open source font family inspired by Highway Gothic",
"folderName": "Overpass",
"licenseId": "OFL-1.1-no-RFN or LGPL-2.1-only",
"patchedName": "Overpass",
"version": "3.0.5"
},
{
"caskName": "profont",
"description": "Looks best with anti-aliasing turned off, squared off character corners, vertically tight small `s`",
"folderName": "ProFont",
"licenseId": "MIT",
"patchedName": "ProFont",
"version": "2.3/2.2"
},
{
"caskName": "proggy-clean-tt",
"description": "Designed particularly for use at small point sizes",
"folderName": "ProggyClean",
"licenseId": "MIT",
"patchedName": "ProggyClean",
"version": "2004/04/15"
},
{
"caskName": "recursive-mono",
"description": "inspired by casual script signpainting, 4 variants",
"folderName": "Recursive",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "RecMono",
"version": "1.085"
},
{
"caskName": "roboto-mono",
"description": "Dashed zero, curved and straight character lines",
"folderName": "RobotoMono",
"licenseId": "Apache-2.0",
"patchedName": "RobotoMono",
"version": "3.0"
},
{
"caskName": "shure-tech-mono",
"description": "Dotted zeros, distinguishable 1 and l, curved and straight character lines",
"folderName": "ShareTechMono",
"licenseId": "OFL-1.1-RFN",
"patchedName": "ShureTechMono",
"version": "1.003"
},
{
"caskName": "sauce-code-pro",
"description": "Monospaced font family for user interface and coding environments",
"folderName": "SourceCodePro",
"licenseId": "OFL-1.1-RFN",
"patchedName": "SauceCodePro",
"version": "2.042"
},
{
"caskName": "space-mono",
"description": "Squarish character lines, dotted zero, aggressive parethesis",
"folderName": "SpaceMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "SpaceMono",
"version": "1.001"
},
{
"caskName": "symbols-only",
"description": "Just the Nerd Font Icons. I.e Symbol font only",
"folderName": "NerdFontsSymbolsOnly",
"licenseId": "MIT",
"patchedName": "Symbols",
"version": "latest"
},
{
"caskName": "terminess-ttf",
"description": "Squarish characters that are slightly askew",
"folderName": "Terminus",
"licenseId": "OFL-1.1-RFN",
"patchedName": "Terminess",
"version": "4.49.2"
},
{
"caskName": "tinos",
"description": "Some similarities to Times New Roman, designed by Steve Matteson, includes pan-European WGL character set",
"folderName": "Tinos",
"licenseId": "Apache-2.0",
"patchedName": "Tinos",
"version": "1.23"
},
{
"caskName": "ubuntu",
"description": "Specially created for Ubuntu",
"folderName": "Ubuntu",
"licenseId": "LicenseRef-UbuntuFont",
"patchedName": "Ubuntu",
"version": "0.83"
},
{
"caskName": "ubuntu-mono",
"description": "Dotted zeros, used the `n`, `o`, `H` & `O` Latin characters as a base for design",
"folderName": "UbuntuMono",
"licenseId": "LicenseRef-UbuntuFont",
"patchedName": "UbuntuMono",
"version": "0.80"
},
{
"caskName": "ubuntu-sans",
"description": "Refreshed version of Ubuntu and Ubuntu Mono fonts",
"folderName": "UbuntuSans",
"licenseId": "LicenseRef-UbuntuFont",
"patchedName": "UbuntuSans",
"version": "1.006"
},
{
"caskName": "victor-mono",
"description": "Clean, crisp and narrow, with a large x-height and clear punctuation",
"folderName": "VictorMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "VictorMono",
"version": "1.5.6"
},
{
"caskName": "zed-mono",
"description": "Zed Mono is a more rounded version of Iosevka",
"folderName": "ZedMono",
"licenseId": "OFL-1.1-no-RFN",
"patchedName": "ZedMono",
"version": "1.2.0"
}
]

View File

@@ -0,0 +1,3 @@
{
"tag_name": "v3.4.0"
}

View File

@@ -0,0 +1,91 @@
#! /usr/bin/env nix-shell
#! nix-shell -p python3 -i python3
import os
import urllib.request as ureq
import json
import html
if not all(
f"UPDATE_NIX_{v}" in os.environ
for v in ["NAME", "PNAME", "OLD_VERSION", "ATTR_PATH"]
) or not os.environ['UPDATE_NIX_ATTR_PATH'].startswith("nerd-fonts."):
raise Exception(
"Please don't run this script manually, only with:\n"
"nix-shell maintainers/scripts/update.nix --argstr path nerd-fonts "
"--argstr commit true"
)
RELEASE_INFO_URL = "https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest"
FONTS_INFO_URL_TEMPLATE = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/refs/tags/{}/bin/scripts/lib/fonts.json"
SHA256_URL_TEMPLATE = "https://github.com/ryanoasis/nerd-fonts/releases/download/{}/SHA-256.txt"
RELEASE_INFO_FILENAME = "release.json"
FONTS_INFO_FILENAME = "fonts.json"
CHECKSUMS_FILENAME = "checksums.json"
def fetchjson(url):
with ureq.urlopen(url) as r:
return json.loads(r.read())
def storejson(path, obj):
with open(path, "w", encoding="utf-8") as f:
json.dump(obj, f, indent=2, ensure_ascii=False)
# Needed to satisfy EditorConfig's rules
f.write('\n')
def slicedict(d, ks):
return {k: html.unescape(d[k]) for k in ks}
os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), "manifests"))
release_info = slicedict(
fetchjson(RELEASE_INFO_URL),
["tag_name"]
)
tag_name = release_info["tag_name"]
with open(RELEASE_INFO_FILENAME, "r", encoding="utf-8") as f:
former_tag_name = json.load(f)["tag_name"]
if tag_name == former_tag_name:
raise Exception("no newer version available")
# See: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#supported-features
print(json.dumps(
[
{
"attrPath": "nerd-fonts",
"oldVersion": former_tag_name.removeprefix("v"),
"newVersion": tag_name.removeprefix("v"),
},
],
indent=2
))
storejson(RELEASE_INFO_FILENAME, release_info)
storejson(
FONTS_INFO_FILENAME,
[
slicedict(
item,
[
"caskName",
"description",
"folderName",
"licenseId",
"patchedName",
"version",
]
)
for item in fetchjson(FONTS_INFO_URL_TEMPLATE.format(tag_name))["fonts"]
],
)
storejson(
CHECKSUMS_FILENAME,
{
filename: sha256
for row in ureq.urlopen(SHA256_URL_TEMPLATE.format(tag_name))
for sha256, filename in [row.decode('utf-8').split()]
if filename.endswith(".tar.xz")
},
)

View File

@@ -0,0 +1,97 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
let
mkOpenRelayTypeface =
name:
{ directory, meta }:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "open-relay-${name}";
version = "2025-09-01";
src = fetchFromGitHub {
owner = "kreativekorp";
repo = "open-relay";
tag = finalAttrs.version;
hash = "sha256-+vG9gzbb3x7Fh3xIpUJZRpclz1qT+gyTSqmOtKJXZtw=";
};
installPhase = ''
runHook preInstall
install -D -m444 -t "$out/share/fonts/truetype" "${directory}/"*.ttf
install -D -m644 -t "$out/share/doc/${finalAttrs.pname}-${finalAttrs.version}" "${directory}/OFL.txt"
runHook postInstall
'';
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/index.shtml";
description = "Free and open source fonts from Kreative Software";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [
linus
toastal
];
}
// meta;
});
in
lib.mapAttrs mkOpenRelayTypeface {
constructium = {
directory = "Constructium";
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/constructium/";
description = "Fork of SIL Gentium designed specifically to support constructed scripts as encoded in the Under-ConScript Unicode Registry";
longDescription = ''
Constructium is a fork of SIL Gentium designed specifically to support
constructed scripts as encoded in the Under-ConScript Unicode Registry.
It is ideal for mixed Latin, Greek, Cyrillic, IPA, and conlang text in
web sites and documents.
'';
};
};
fairfax = {
directory = "Fairfax";
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/fairfax/";
description = "6×12 bitmap font supporting many Unicode blocks & scripts as well as constructed scripts";
longDescription = ''
Fairfax is a 6×12 bitmap font for terminals, text editors, IDEs, etc. It
supports many scripts and a large number of Unicode blocks as well as
constructed scripts as encoded in the Under-ConScript Unicode Registry,
pseudographics and semigraphics, and tons of private use characters. It
has been superceded by Fairfax HD but is still maintained.
'';
};
};
fairfax-hd = {
directory = "FairfaxHD";
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/fairfaxhd/";
description = "Halfwidth scalable monospace font supporting many Unicode blocks & script as well as constructed scripts";
longDescription = ''
Fairfax HD is a halfwidth scalable monospace font for terminals, text
editors, IDEs, etc. It supports many scripts and a large number of
Unicode blocks as well as constructed scripts as encoded in the
Under-ConScript Unicode Registry, pseudographics and semigraphics, and
tons of private use characters.
'';
};
};
kreative-square = {
directory = "KreativeSquare";
meta = {
homepage = "https://www.kreativekorp.com/software/fonts/ksquare/";
description = "Fullwidth scalable monospace font designed specifically to support pseudographics, semigraphics, and private use characters";
};
};
}

View File

@@ -0,0 +1,77 @@
diff --git a/helpers/generate-fonts-runner.sh b/helpers/generate-fonts-runner.sh
index 21267e50f..873b5c664 100755
--- a/helpers/generate-fonts-runner.sh
+++ b/helpers/generate-fonts-runner.sh
@@ -25,10 +25,10 @@ mkdir -p "$build_dir"
# Change these to enable/disable formats
# Remember to update font/README.md accordingly
-methods_black=(glyf)
-methods_color=(cbdt glyf_colr_0 glyf_colr_1 sbix picosvgz untouchedsvgz)
+#methods_black=(glyf)
+#methods_color=(cbdt glyf_colr_0 glyf_colr_1 sbix picosvgz untouchedsvgz)
-saturations=(black color)
+#saturations=(black color)
for saturation in "${saturations[@]}"; do
case "$saturation" in
black)
@@ -43,6 +43,7 @@ for saturation in "${saturations[@]}"; do
mkdir -p "$build_dir/$saturation"
for method in "${methods[@]}"; do
+ if [ -z "$method" ]; then continue; fi
cat >"$build_dir/$saturation/OpenMoji-$saturation-$method.toml" <<-EOF
output_file = "$build_dir/$saturation/OpenMoji-$saturation-$method.ttf"
color_format = "$method"
@@ -55,10 +56,7 @@ default = 400
[master.regular]
style_name = "Regular"
-
-# To quickly check build reverse comments below
-srcs = ["/mnt/$saturation/svg/*.svg"]
-# srcs = ["/mnt/$saturation/svg/1F923.svg", "/mnt/$saturation/svg/1F1E9-1F1F0.svg"]
+srcs = ["$(pwd)/$saturation/svg/*.svg"]
[master.regular.position]
wght = 400
@@ -71,7 +69,7 @@ EOF
for method in "${methods[@]}"; do
# Generate XML for font
sed "s/Color/${saturation^}/;" \
- /mnt/data/OpenMoji-Color.ttx \
+ data/OpenMoji-Color.ttx \
> "$build_dir/$saturation/OpenMoji-$saturation-$method.ttx"
# Add version to XML
@@ -89,25 +87,21 @@ EOF
# Compress with WOFF2
woff2_compress "$build_dir/fonts/OpenMoji-$saturation-$method/OpenMoji-$saturation-$method.ttf"
-
- # Generate font demo
- /mnt/helpers/generate-font-demo.js "OpenMoji-$saturation-$method.woff2" "$build_dir/fonts/OpenMoji-$saturation-$method"
done
done
-for colr_version in 0 1; do
+for colr_version in "${maximumColorVersions[@]}"; do
+ if [ -z "$colr_version" ]; then continue; fi
# Make TTF with both COLR and SVG font data in it
mkdir -p "$build_dir/fonts/OpenMoji-color-colr${colr_version}_svg"
- maximum_color \
+ maximum_color --build_dir="$build_dir/color" \
"$build_dir/fonts/OpenMoji-color-glyf_colr_${colr_version}/OpenMoji-color-glyf_colr_${colr_version}.ttf"\
--output_file "$build_dir/fonts/OpenMoji-color-colr${colr_version}_svg/OpenMoji-color-colr${colr_version}_svg.ttf"
woff2_compress "$build_dir/fonts/OpenMoji-color-colr${colr_version}_svg/OpenMoji-color-colr${colr_version}_svg.ttf"
- /mnt/helpers/generate-font-demo.js\
- "OpenMoji-color-colr${colr_version}_svg.woff2"\
- "$build_dir/fonts/OpenMoji-color-colr${colr_version}_svg"
+ rm -rf "$build_dir/fonts/OpenMoji-color-glyf_colr_${colr_version}"
done
echo "Done building fonts!"

View File

@@ -0,0 +1,109 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
nanoemoji,
python3Packages,
woff2,
xmlstarlet,
# available color formats: ["cbdt" "glyf_colr_0" "glyf_colr_1" "sbix" "picosvgz" "untouchedsvgz"]
# available black formats: ["glyf"]
fontFormats ? [
"glyf"
"cbdt"
"glyf_colr_0"
"glyf_colr_1"
],
# when at least one of the glyf_colr_0/1 formats is specified, whether to build maximum color fonts
# "none" to not build any, "svg" to build colr+svg, "bitmap" to build cbdt+colr+svg fonts
buildMaximumColorFonts ? "bitmap",
}:
let
# all available methods
methods = {
black = [ "glyf" ];
color = [
"cbdt"
"glyf_colr_0"
"glyf_colr_1"
"sbix"
"picosvgz"
"untouchedsvgz"
];
};
in
assert lib.asserts.assertEachOneOf "fontFormats" fontFormats (methods.black ++ methods.color);
assert lib.asserts.assertOneOf "buildMaximumColorFonts" buildMaximumColorFonts [
"none"
"bitmap"
"svg"
];
stdenvNoCC.mkDerivation rec {
pname = "openmoji";
version = "16.0.0";
src = fetchFromGitHub {
owner = "hfg-gmuend";
repo = "openmoji";
rev = version;
hash = "sha256-4dYtLaABu88z25Ud/cuOECajxSJWR01qcTIZNWN7Fhw=";
};
patches = [
# fix paths and variables for nix build and skip generating font demos
./build.patch
];
nativeBuildInputs = [
nanoemoji
python3Packages.fonttools
woff2
xmlstarlet
];
methods_black = builtins.filter (m: builtins.elem m fontFormats) methods.black;
methods_color = builtins.filter (m: builtins.elem m fontFormats) methods.color;
saturations =
lib.optional (methods_black != [ ]) "black" ++ lib.optional (methods_color != [ ]) "color";
maximumColorVersions = lib.optionals (buildMaximumColorFonts != "none") (
lib.optional (builtins.elem "glyf_colr_0" fontFormats) "0"
++ lib.optional (builtins.elem "glyf_colr_1" fontFormats) "1"
);
postPatch = lib.optionalString (buildMaximumColorFonts == "bitmap") ''
substituteInPlace helpers/generate-fonts-runner.sh \
--replace 'maximum_color' 'maximum_color --bitmaps'
'';
buildPhase = ''
runHook preBuild
bash helpers/generate-fonts-runner.sh "$(pwd)/build" "${version}"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype $out/share/fonts/woff2
cp build/fonts/*/*.ttf $out/share/fonts/truetype/
cp build/fonts/*/*.woff2 $out/share/fonts/woff2/
runHook postInstall
'';
meta = with lib; {
license = licenses.cc-by-sa-40;
maintainers = with maintainers; [
_999eagle
fgaz
];
platforms = platforms.all;
homepage = "https://openmoji.org/";
downloadPage = "https://github.com/hfg-gmuend/openmoji/releases";
description = "Open-source emojis for designers, developers and everyone else";
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
let
version = "1.3.9";
mkPretendard =
{
pname,
typeface,
hash,
}:
stdenvNoCC.mkDerivation {
inherit pname version;
src = fetchzip {
url = "https://github.com/orioncactus/pretendard/releases/download/v${version}/${typeface}-${version}.zip";
stripRoot = false;
inherit hash;
};
installPhase = ''
runHook preInstall
install -Dm644 public/static/*.otf -t $out/share/fonts/opentype
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/orioncactus/pretendard";
description = "Alternative font to system-ui for all platforms";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ sudosubin ];
};
};
in
{
pretendard = mkPretendard {
pname = "pretendard";
typeface = "Pretendard";
hash = "sha256-n7RQApffpL/8ojHcZbdxyanl9Tlc8HP8kxLFBdArUfY=";
};
pretendard-gov = mkPretendard {
pname = "pretendard-gov";
typeface = "PretendardGOV";
hash = "sha256-qoDUBOmrk6WPKQgnapThfKC01xWup+HN82hcoIjEe0M=";
};
pretendard-jp = mkPretendard {
pname = "pretendard-jp";
typeface = "PretendardJP";
hash = "sha256-1nTk1LPoRSfSDgDuGWkcs6RRIY4ZOqDBPMsxezMos6Q=";
};
pretendard-std = mkPretendard {
pname = "pretendard-std";
typeface = "PretendardStd";
hash = "sha256-gkYqqxSICmSIrBuPRzBaOlGGM/rJU1z7FiFvu9RhK5s=";
};
}

View File

@@ -0,0 +1,141 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
let
makeSuperOTC =
{
family,
description,
rev,
hash,
zip ? "",
prefix ? "",
}:
let
Family = lib.toUpper (lib.substring 0 1 family) + lib.substring 1 (lib.stringLength family) family;
in
stdenvNoCC.mkDerivation rec {
pname = "source-han-${family}";
version = lib.removeSuffix "R" rev;
src = fetchurl {
url = "https://github.com/adobe-fonts/source-han-${family}/releases/download/${rev}/${prefix}SourceHan${Family}.ttc${zip}";
inherit hash;
};
nativeBuildInputs = lib.optionals (zip == ".zip") [ unzip ];
unpackPhase =
lib.optionalString (zip == "") ''
cp $src SourceHan${Family}.ttc${zip}
''
+ lib.optionalString (zip == ".zip") ''
unzip $src
'';
installPhase = ''
runHook preInstall
install -Dm444 *.ttc -t $out/share/fonts/opentype/${pname}
runHook postInstall
'';
meta = {
description = "Open source Pan-CJK ${description} typeface";
homepage = "https://github.com/adobe-fonts/source-han-${family}";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [
taku0
emily
];
};
};
makeVariable =
{
family,
version,
hash,
format,
}:
let
Family = lib.toUpper (lib.substring 0 1 family) + lib.substring 1 (lib.stringLength family) family;
in
fetchurl {
pname = "source-han-${family}-vf-${format}";
inherit version hash;
url = "https://raw.githubusercontent.com/adobe-fonts/source-han-${family}/${version}R/Variable/OTC/SourceHan${Family}-VF.${format}.ttc";
recursiveHash = true;
downloadToTemp = true;
postFetch = "install -Dm444 $downloadedFile $out/share/fonts/variable/SourceHan${Family}-VF.${format}.ttc";
meta = {
description = "Open source Pan-CJK ${Family} typeface";
homepage = "https://github.com/adobe-fonts/source-han-${family}";
license = lib.licenses.ofl;
maintainers = with lib.maintainers; [
taku0
emily
];
};
};
in
{
sans = makeSuperOTC {
family = "sans";
description = "sans-serif";
rev = "2.005R";
hash = "sha256-oCTPF1lJSEfNR6rkN5vLPcUwAXxwnz9QPuDtkY3ZKVI=";
zip = ".zip";
prefix = "01_";
};
serif = makeSuperOTC {
family = "serif";
description = "serif";
rev = "2.003R";
hash = "sha256-buaJq1eJSuNa9gSnPpXDcr2gMGYQ/6F5pHCOjNR6eV8=";
zip = ".zip";
prefix = "01_";
};
mono = makeSuperOTC {
family = "mono";
description = "monospaced";
rev = "1.002";
hash = "sha256-DBkkSN6QhI8R64M2h2iDqaNtxluJZeSJYAz8x6ZzWME=";
};
sans-vf-otf = makeVariable {
family = "sans";
version = "2.005";
hash = "sha256-7/THncqTE6IpPezcX14eYRRC8WR/xPv0XjfOPEfF8aU=";
format = "otf";
};
sans-vf-ttf = makeVariable {
family = "sans";
version = "2.005";
hash = "sha256-CL5kjZzCiNvdcwiFflTlarINpeYxvuqZH+4ayiIQdD8=";
format = "ttf";
};
serif-vf-otf = makeVariable {
family = "serif";
version = "2.003";
hash = "sha256-a6295Ukha9QY5ByMr2FUy13j5gZ1itnezvfJWmJjqt0=";
format = "otf";
};
serif-vf-ttf = makeVariable {
family = "serif";
version = "2.003";
hash = "sha256-F+FUQunfyAEBVV10lZxC3dzGTWhHgHzpTO8CjC3n4WY=";
format = "ttf";
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchzip,
}:
let
variants = {
bonum = {
displayName = "Bonum";
version = "1.005";
sha256 = "1b6x7siypyxp1lhq7xxdqafwbn6p2p3xm3jb38q999sv8cgslxz8";
outputHash = "1zjaxkzidqmxakh9d61n0by9mi8hrmir45jppjj6hzwhm3rvknff";
};
pagella = {
displayName = "Pagella";
version = "1.632";
sha256 = "0f4cgq9w0lc1fbcbfqiv19mdhivbsscl13jmb0ln685641ci2sjr";
outputHash = "0wz2n1dpx9b8a0qgqy8vl712fxhi87mhcda281xaad62chndwf6k";
};
schola = {
displayName = "Schola";
version = "1.533";
sha256 = "0caqgkz7gz700h5a1mai0gq8hv7skrgs5nnrs1f7zw1mb9g53ya9";
outputHash = "0jk4bpxki95a9lmfj4cgpnv1jwlkh8qixbkf498n1x7hkaz03f5n";
};
termes = {
displayName = "Termes";
version = "1.543";
sha256 = "10ayqfpryfn1l35hy0vwyjzw3a6mfsnzgf78vsnccgk2gz1g9vhz";
outputHash = "0pa433cgshlypbyrrlp3qq0wg972rngcp37pr8pxdfshgz13q1mm";
};
};
mkVariant =
variant:
{
displayName,
version,
sha256,
outputHash,
}:
let
dotless_version = builtins.replaceStrings [ "." ] [ "" ] version;
in
stdenv.mkDerivation rec {
name = "tex-gyre-${variant}-math-${version}";
inherit version;
src = fetchzip {
url = "http://www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
inherit sha256;
};
installPhase = ''
install -m444 -Dt $out/share/fonts/opentype opentype/*.otf
install -m444 -Dt $out/share/doc/${name} doc/*.txt
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
inherit outputHash;
meta = with lib; {
longDescription = ''
TeX Gyre ${displayName} Math is a math companion for the TeX Gyre
${displayName} family of fonts (see
http://www.gust.org.pl/projects/e-foundry/tex-gyre/) in the OpenType format.
'';
homepage = "http://www.gust.org.pl/projects/e-foundry/tg-math";
# "The TeX Gyre Math fonts are licensed under the GUST Font License (GFL),
# which is a free license, legally equivalent to the LaTeX Project Public
# License (LPPL), version 1.3c or later." - GUST website
license = licenses.lppl13c;
maintainers = with maintainers; [ siddharthist ];
platforms = platforms.all;
};
};
in
lib.mapAttrs mkVariant variants

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchzip,
}:
let
mkVariant =
variant:
{
version,
abbreviation,
sha256,
outputHash,
}:
stdenv.mkDerivation {
name = "tex-gyre-${variant}-${version}";
inherit version;
src = fetchzip {
url = "http://www.gust.org.pl/projects/e-foundry/tex-gyre/${variant}/${abbreviation}${version}otf.zip";
stripRoot = false;
inherit sha256;
};
installPhase = ''
mkdir -p $out/share/fonts/opentype/
# Pagella & Adventor are not flat archives
test -d "${abbreviation}${version}otf" && cd "${abbreviation}${version}otf"
cp -v *.otf $out/share/fonts/opentype/
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
inherit outputHash;
meta = with lib; {
homepage = "http://www.gust.org.pl/projects/e-foundry/tex-gyre";
# "The TeX Gyre fonts are licensed under the GUST Font License (GFL),
# which is a free license, legally equivalent to the LaTeX Project Public
# License (LPPL), version 1.3c or later." - GUST website
license = licenses.lppl13c;
maintainers = [ ];
platforms = platforms.all;
};
};
in
lib.mapAttrs mkVariant {
adventor = {
version = "2_501";
sha256 = "0qjg3x0adfppyx3x33cm07ww9i9sl88xaq07m7wfip8rmyp567fn";
outputHash = "117h6f02m1r54b4f1a98q5kkjchl5pv9ibm1jla6xrzhk2pchb27";
abbreviation = "qag";
};
bonum = {
version = "2.004";
sha256 = "0qbrs98knx4h0b297c5n3vav4mkal1a95ai2dzmdc10pghfzl8vv";
outputHash = "0bid8gzwz50ylmm8jyqf9s4nfvy6cp1x34wbyrh4gyk1ki6hf3z1";
abbreviation = "qbk";
};
chorus = {
version = "2.003";
sha256 = "1b0zak27fzmapwbf2jasvsd95vhnqyc92n985d1lc1ivwja1zgfa";
outputHash = "0fqifd45c1ys6y98b66lmldfbv7wjb2414fs9swicv4n7xvl3cp1";
abbreviation = "qzc";
};
cursor = {
version = "2.004";
sha256 = "0ck3jm33bk2xsxp5d2irzd3j24zb49f0gnjvd1nikg1ivk8w85ng";
outputHash = "0i76835xqlkrnlx303mx63m0f4899j056c2ag2fl6p9qk8s4rskp";
abbreviation = "qcr";
};
heros = {
version = "2.004";
sha256 = "1fj2srxxf6ap913y5yd3dn4jzg828j7381gifs39nm5lnzmgw78y";
outputHash = "16y76ab46fxm9k8wfmwx4w0cl96yrmjywz587lyr08s0agp1v3kf";
abbreviation = "qhv";
};
pagella = {
version = "2_501";
sha256 = "1kccaxs3vk93la2pz4nv05hx1x3diyla49cz4l33zifdcp2zgg9d";
outputHash = "1nnjsgplimh29502pkd19rvfg93x31svxxmx4x7h51njrx1j8qa8";
abbreviation = "qpl";
};
schola = {
version = "2.005";
sha256 = "05z3gk4mm0sa7wwjcv31j2xlzqhwhcncpamn0kn9y0221cdknyp8";
outputHash = "1yqq1ngcylhldrh1v35l439k72szq9m4gx6g0wh235fk65chb2bm";
abbreviation = "qcs";
};
termes = {
version = "2.004";
sha256 = "1aq3yqbgkc3z20dkcqyhicsyq0afbgg4l397z96sd8a16jyz2x8k";
outputHash = "1igw821m601h8937pix6yish4d8fxmz3h4j9hripf41bxsiafzzg";
abbreviation = "qtm";
};
}