From bfc0b4fc5d4bd832d06b4a10f677fc46c80e3b71 Mon Sep 17 00:00:00 2001 From: rczb Date: Fri, 8 Nov 2024 20:24:10 +0800 Subject: [PATCH] nerdfonts: separate into individual packages under namespace nerd-fonts --- .../manual/release-notes/rl-2411.section.md | 6 + .../terminal-emulators/kitty/default.nix | 4 +- pkgs/data/fonts/nerd-fonts/default.nix | 64 ++ pkgs/data/fonts/nerd-fonts/fonts.json | 806 ++++++++++++++++++ .../release-version.json} | 0 pkgs/data/fonts/nerd-fonts/update.js | 74 ++ pkgs/data/fonts/nerd-fonts/update.sh | 12 + pkgs/data/fonts/nerdfonts/default.nix | 72 -- pkgs/data/fonts/nerdfonts/shas.nix | 69 -- pkgs/data/fonts/nerdfonts/update.sh | 26 - pkgs/top-level/aliases.nix | 4 + pkgs/top-level/all-packages.nix | 13 +- 12 files changed, 969 insertions(+), 181 deletions(-) create mode 100644 pkgs/data/fonts/nerd-fonts/default.nix create mode 100644 pkgs/data/fonts/nerd-fonts/fonts.json rename pkgs/data/fonts/{nerdfonts/version.nix => nerd-fonts/release-version.json} (100%) create mode 100644 pkgs/data/fonts/nerd-fonts/update.js create mode 100755 pkgs/data/fonts/nerd-fonts/update.sh delete mode 100644 pkgs/data/fonts/nerdfonts/default.nix delete mode 100644 pkgs/data/fonts/nerdfonts/shas.nix delete mode 100755 pkgs/data/fonts/nerdfonts/update.sh diff --git a/nixos/doc/manual/release-notes/rl-2411.section.md b/nixos/doc/manual/release-notes/rl-2411.section.md index 49e981355581e..5055f85a4e81b 100644 --- a/nixos/doc/manual/release-notes/rl-2411.section.md +++ b/nixos/doc/manual/release-notes/rl-2411.section.md @@ -711,6 +711,12 @@ - `python3Packages.nose` has been removed, as it has been deprecated and unmaintained for almost a decade and does not work on Python 3.12. Please switch to `pytest` or another test runner/framework. +- `nerdfonts` has been separated into individual font packages under the namespace `nerd-fonts`. + The directories for font files have changed from `$out/share/fonts/{opentype,truetype}/NerdFonts` + to `$out/share/fonts/{opentype,truetype}/`, where `` can be found in + the upstream [`fonts.json`](https://github.com/ryanoasis/nerd-fonts/blob/master/bin/scripts/lib/fonts.json) + as the `patchedName` properties, with whitespaces (if any) trimmed. + ## Other Notable Changes {#sec-release-24.11-notable-changes} diff --git a/pkgs/applications/terminal-emulators/kitty/default.nix b/pkgs/applications/terminal-emulators/kitty/default.nix index cab3a2103a546..b95b2a5dab2ad 100644 --- a/pkgs/applications/terminal-emulators/kitty/default.nix +++ b/pkgs/applications/terminal-emulators/kitty/default.nix @@ -2,7 +2,7 @@ , harfbuzz, fontconfig, pkg-config, ncurses, imagemagick , libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor , libxkbcommon, libXi, libXext, wayland-protocols, wayland, xxHash -, nerdfonts +, nerd-fonts , lcms2 , librsync , openssl @@ -140,7 +140,7 @@ buildPythonApplication rec { # Add the font by hand because fontconfig does not finds it in darwin mkdir ./fonts/ - cp "${(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})}/share/fonts/truetype/NerdFonts/SymbolsNerdFontMono-Regular.ttf" ./fonts/ + cp "${nerd-fonts.symbols-only}/share/fonts/truetype/Symbols/SymbolsNerdFontMono-Regular.ttf" ./fonts/ ${ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) "export MACOSX_DEPLOYMENT_TARGET=11" } ${if stdenv.hostPlatform.isDarwin then '' diff --git a/pkgs/data/fonts/nerd-fonts/default.nix b/pkgs/data/fonts/nerd-fonts/default.nix new file mode 100644 index 0000000000000..a183aa0d59d6e --- /dev/null +++ b/pkgs/data/fonts/nerd-fonts/default.nix @@ -0,0 +1,64 @@ +{ + lib, + stdenvNoCC, + fetchzip, +}: + +let + releaseVersion = lib.trivial.importJSON ./release-version.json; + makeNerdFont = + { + pname, + dirName, + originalName, + declaresRFN, + version, + longDescription, + license, + url, + sha256, + ... + }: + stdenvNoCC.mkDerivation { + inherit pname version; + + src = fetchzip { + inherit url sha256; + stripRoot = false; + }; + + installPhase = '' + runHook preInstall + + dst_opentype=$out/share/fonts/opentype/${dirName} + dst_truetype=$out/share/fonts/truetype/${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 = { + updateScript = ./update.sh; + inherit originalName declaresRFN; + }; + + meta = { + inherit longDescription license; + homepage = "https://nerdfonts.com/"; + changelog = "https://github.com/ryanoasis/nerd-fonts/blob/v${releaseVersion}/changelog.md"; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ + doronbehar + rc-zb + ]; + }; + }; +in + +builtins.listToAttrs ( + map (font: lib.attrsets.nameValuePair font.attrName (makeNerdFont font)) ( + lib.trivial.importJSON ./fonts.json + ) +) diff --git a/pkgs/data/fonts/nerd-fonts/fonts.json b/pkgs/data/fonts/nerd-fonts/fonts.json new file mode 100644 index 0000000000000..bd0f5694a950e --- /dev/null +++ b/pkgs/data/fonts/nerd-fonts/fonts.json @@ -0,0 +1,806 @@ +[ + { + "pname": "0xproto", + "attrName": "_0xproto", + "dirName": "0xProto", + "originalName": "0xProto", + "declaresRFN": false, + "version": "1.603", + "longDescription": "An opinionated font for software engineers", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/0xProto.tar.xz", + "sha256": "05zmdfsvj3wrx5751jvaxc2vniv7syiz1ymh1nw7p9gmlbv152k8" + }, + { + "pname": "3270", + "attrName": "_3270", + "dirName": "3270", + "originalName": "IBM 3270", + "declaresRFN": false, + "version": "3.0.1", + "longDescription": "Derived from the x3270 font, a modern format of a font with high nostalgic value", + "license": "BSD-3-Clause", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/3270.tar.xz", + "sha256": "13lr4mpar17bxd2mnk19hmd8xyyxqrin6n44d8f2vckcbl5zg6qn" + }, + { + "pname": "agave", + "attrName": "agave", + "dirName": "Agave", + "originalName": "Agave", + "declaresRFN": false, + "version": "37", + "longDescription": "A small, monospace, outline font that is geometrically regular and simple", + "license": "MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Agave.tar.xz", + "sha256": "0vs4062b9gqwirr7gzqksxh0knxh6px10wzkl2ky1df3dy8aj3zm" + }, + { + "pname": "anonymice", + "attrName": "anonymice", + "dirName": "AnonymicePro", + "originalName": "Anonymous Pro", + "declaresRFN": true, + "version": "1.002", + "longDescription": "Inspired by Anonymous 9 on Macintosh, since 2009, distinct `O`, `0`, `I`, `l`, `1`", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/AnonymousPro.tar.xz", + "sha256": "0apgnm78qm9v607jh3nh8s4k0iy393wwrj2qsr2csls68s6a7fif" + }, + { + "pname": "arimo", + "attrName": "arimo", + "dirName": "Arimo", + "originalName": "Arimo", + "declaresRFN": false, + "version": "1.33", + "longDescription": "Metrically similar to Arial, pan-European WGL character set, sans serif", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Arimo.tar.xz", + "sha256": "0hadz4whzkqszdicvgkmawkzbn41kdyb5249k44nz8r63pq68frf" + }, + { + "pname": "aurulent-sans-mono", + "attrName": "aurulent-sans-mono", + "dirName": "AurulentSansM", + "originalName": "Aurulent Sans Mono", + "declaresRFN": false, + "version": "0-unstable-2024-04-12", + "longDescription": "Sans serif, designed by Stephen G. Hartke which also created Verily Serif", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/AurulentSansMono.tar.xz", + "sha256": "037vgjixyl0fmy7pp77wvzlzns44srrqhvld50sv3l44iy5i06ir" + }, + { + "pname": "bigblue-terminal", + "attrName": "bigblue-terminal", + "dirName": "BigBlueTerm", + "originalName": "BigBlue Terminal", + "declaresRFN": false, + "version": "0-unstable-2024-04-12", + "longDescription": "Nostalgic, closely based on IBM's 8x14 EGA/VGA charset", + "license": "CC-BY-SA-4.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/BigBlueTerminal.tar.xz", + "sha256": "1vlfidbvz0kl9cvyb5hfy1ng1vb76ax2gilnjhw7pgnhb10y9rmg" + }, + { + "pname": "bitstream-vera-sans-mono", + "attrName": "bitstream-vera-sans-mono", + "dirName": "BitstromWera", + "originalName": "Bitstream Vera Sans Mono", + "declaresRFN": true, + "version": "1.1", + "longDescription": "Dotted zero, compact lowercase characters", + "license": "Bitstream-Vera", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/BitstreamVeraSansMono.tar.xz", + "sha256": "0dn82l1h47sn5s1ysgy0n66xllnfg0w4qphg748v4x2x2jdvmdds" + }, + { + "pname": "blex-mono", + "attrName": "blex-mono", + "dirName": "BlexMono", + "originalName": "IBM Plex Mono", + "declaresRFN": true, + "version": "2.004 (6.4.0)", + "longDescription": "It's global, it's versatile and it's distinctly IBM", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/IBMPlexMono.tar.xz", + "sha256": "1adrwmh3dvg3cibfh9wgsgn8m18k16awych3bjbna15iip6p28x4" + }, + { + "pname": "caskaydia-cove", + "attrName": "caskaydia-cove", + "dirName": "CaskaydiaCove", + "originalName": "Cascadia Code", + "declaresRFN": true, + "version": "2111.01", + "longDescription": "A fun, new monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CascadiaCode.tar.xz", + "sha256": "0z29a68kx7vlh44kp0mkcbxkx6wv2ah5nlbp8rvw9ihl4ac60wir" + }, + { + "pname": "caskaydia-mono", + "attrName": "caskaydia-mono", + "dirName": "CaskaydiaMono", + "originalName": "Cascadia Mono", + "declaresRFN": true, + "version": "2111.01", + "longDescription": "Like Cascadia Code but without any ligatures", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CascadiaMono.tar.xz", + "sha256": "0k8xahdlisj8zb04qvy0q1ll1kswm92yq068a9yn87hfxaf83cwh" + }, + { + "pname": "code-new-roman", + "attrName": "code-new-roman", + "dirName": "CodeNewRoman", + "originalName": "Code New Roman", + "declaresRFN": false, + "version": "2.0", + "longDescription": "Tunable, slashed zeros, compact smaller characters", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CodeNewRoman.tar.xz", + "sha256": "0fbqryhpan0brqrmxm7s758g6jrnxz7cmqd7q20w9a0jpfyf6316" + }, + { + "pname": "comic-shanns-mono", + "attrName": "comic-shanns-mono", + "dirName": "ComicShannsMono", + "originalName": "Comic Shanns Mono", + "declaresRFN": false, + "version": "1.3.1", + "longDescription": "The very typeface you’ve been trained to recognize since childhood", + "license": "MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/ComicShannsMono.tar.xz", + "sha256": "106vy824jdxpmdhzbz5z5nzm225xypdjmw6gnh8iw48js2xmg3ja" + }, + { + "pname": "commit-mono", + "attrName": "commit-mono", + "dirName": "CommitMono", + "originalName": "Commit Mono", + "declaresRFN": false, + "version": "1.143", + "longDescription": "An anonymous and neutral programming typeface", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/CommitMono.tar.xz", + "sha256": "0hwm3wpfg6zbh2bhgp57a0x3vjizp6mmra9apsinywszfpskj67b" + }, + { + "pname": "cousine", + "attrName": "cousine", + "dirName": "Cousine", + "originalName": "Cousine", + "declaresRFN": false, + "version": "1.211", + "longDescription": "Similar to Courier New with better readablitiy, dotted zeros", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Cousine.tar.xz", + "sha256": "0zh8l1d6h3m7mzqr03z7xga5g9h11xf27hdskj6axyaw39zly3ax" + }, + { + "pname": "d2coding", + "attrName": "d2coding", + "dirName": "D2CodingLigature", + "originalName": "D2Coding", + "declaresRFN": false, + "version": "1.3.2", + "longDescription": "A coding font for Koreans. This is the variant with ligatures.", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/D2Coding.tar.xz", + "sha256": "0dzf8ycl1wsxf56ljqbirrds99hga29vb92ajmd573dmbpn2l73l" + }, + { + "pname": "daddy-time-mono", + "attrName": "daddy-time-mono", + "dirName": "DaddyTimeMono", + "originalName": "DaddyTimeMono", + "declaresRFN": false, + "version": "1.2.3", + "longDescription": "A monospaced font for programmers and other terminal groupies", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/DaddyTimeMono.tar.xz", + "sha256": "0cyd2dz5q2g37sq4806grrwp8vmq0n0na003nlhxfm4x18af3kna" + }, + { + "pname": "dejavu-sans-mono", + "attrName": "dejavu-sans-mono", + "dirName": "DejaVuSansM", + "originalName": "DejaVu Sans Mono", + "declaresRFN": false, + "version": "2.37", + "longDescription": "Dotted zero, based on the Bitstream Vera Fonts with a wider range of character", + "license": "Bitstream-Vera", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/DejaVuSansMono.tar.xz", + "sha256": "17ixcz0licrlxzrq39d5x1pd5nj4d37gaimi0xj38z9y86yqi1c0" + }, + { + "pname": "droid-sans-mono", + "attrName": "droid-sans-mono", + "dirName": "DroidSansM", + "originalName": "Droid Sans Mono", + "declaresRFN": false, + "version": "1.00-113", + "longDescription": "Good for small screens or font sizes", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/DroidSansMono.tar.xz", + "sha256": "0bxrzkmm759xprrssfakgngqlhyiinc5my30xfvvbwj97lzmksf9" + }, + { + "pname": "envy-code-r", + "attrName": "envy-code-r", + "dirName": "EnvyCodeR", + "originalName": "Envy Code R", + "declaresRFN": true, + "version": "0.79", + "longDescription": "Fully-scalable monospaced font designed for programming and command prompts", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/EnvyCodeR.tar.xz", + "sha256": "1fxx4b82g7qvccs1dldrcnm1hbkdnyn9rcmnqsfbrjjhm8b3q8jz" + }, + { + "pname": "fantasque-sans-mono", + "attrName": "fantasque-sans-mono", + "dirName": "FantasqueSansM", + "originalName": "Fantasque Sans Mono", + "declaresRFN": false, + "version": "1.8.0", + "longDescription": "\"Wibbly-wobbly handwriting-like fuzziness\", takes some inspiration from Inconsolata and Monaco", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FantasqueSansMono.tar.xz", + "sha256": "17zs2jczva1kyrmhyknmvp4h254c6vkh4g3lkwksqmyh2vhsn069" + }, + { + "pname": "fira-code", + "attrName": "fira-code", + "dirName": "FiraCode", + "originalName": "Fira Code", + "declaresRFN": false, + "version": "6.2", + "longDescription": "Programming ligatures, extension of Fira Mono font, enlarged operators", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FiraCode.tar.xz", + "sha256": "03a2xggq45pm081jdjm3nhzaxkrfkrsq6q9qdn63q5qxlvgv53a7" + }, + { + "pname": "fira-mono", + "attrName": "fira-mono", + "dirName": "FiraMono", + "originalName": "Fira", + "declaresRFN": false, + "version": "3.206", + "longDescription": "Mozilla typeface, dotted zero", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/FiraMono.tar.xz", + "sha256": "1ziimm888hy6wwbmifqk9zbxhlvmnrljsxkqc17044595288jvv7" + }, + { + "pname": "geist-mono", + "attrName": "geist-mono", + "dirName": "GeistMono", + "originalName": "Geist Mono", + "declaresRFN": false, + "version": "1.2.0 (1.3.0)", + "longDescription": "Monospaced typeface designed to be used in code editors, diagrams, terminals, and other textbased interfaces where code is represented", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/GeistMono.tar.xz", + "sha256": "1qd11wzsd1sld3rrk7blcib9fv5mbk72z4wjfp1gqip05zpmq8c6" + }, + { + "pname": "go-mono", + "attrName": "go-mono", + "dirName": "GoMono", + "originalName": "Go Mono", + "declaresRFN": false, + "version": "2.010", + "longDescription": "Created specifically for the Go project, looks particularly clear for use with the Go language", + "license": "BSD-3-Clause-Clear", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Go-Mono.tar.xz", + "sha256": "0xfbrhay70sk22hlbs226r28k71fnx48lx9r21wicwi1wj5zprp1" + }, + { + "pname": "gohufont", + "attrName": "gohufont", + "dirName": "GohuFont", + "originalName": "Gohu", + "declaresRFN": false, + "version": "2.0", + "longDescription": "Bitmap font, tall capitals and ascenders, small serifs", + "license": "WTFPL", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Gohu.tar.xz", + "sha256": "1xyfbk412m2ymbfc2kiav8qicqm5jh3b7dxrg9yn2hljdy14v5i4" + }, + { + "pname": "hack", + "attrName": "hack", + "dirName": "Hack", + "originalName": "Hack", + "declaresRFN": false, + "version": "3.003", + "longDescription": "Dotted zero, short descenders, expands upon work done for Bitstream Vera & DejaVu, legible at common sizes", + "license": "Bitstream-Vera AND MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hack.tar.xz", + "sha256": "0agini2vkvvzykxn79iq45g49cg1v2carj1n95hva73c19xl7448" + }, + { + "pname": "hasklug", + "attrName": "hasklug", + "dirName": "Hasklug", + "originalName": "Hasklig", + "declaresRFN": true, + "version": "1.2", + "longDescription": "Monospaced ligatures, makes composite glyphs (e.g. ->) more reabable, especially in Haskell", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hasklig.tar.xz", + "sha256": "03l4b8ka1xvz7lqrzil8q0blvcw9g3w0l1i9rzrr5rqxynxyd2a0" + }, + { + "pname": "heavy-data", + "attrName": "heavy-data", + "dirName": "HeavyData", + "originalName": "Heavy Data", + "declaresRFN": false, + "version": "1", + "longDescription": "Novel and unique design, dotted zero", + "license": "LicenseRef-VicFieger", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/HeavyData.tar.xz", + "sha256": "0ixfd3qdardg4rc0pnhfis3b5b6b6p4x9yb0822chafacqck7gcj" + }, + { + "pname": "hurmit", + "attrName": "hurmit", + "dirName": "Hurmit", + "originalName": "Hermit", + "declaresRFN": true, + "version": "2.0", + "longDescription": "Symbols stand out from common text", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Hermit.tar.xz", + "sha256": "0fcwsqxzdpsf4k4a6557ga9knwi3wy2ywxpnwq06l2vv0jfcxify" + }, + { + "pname": "im-writing", + "attrName": "im-writing", + "dirName": "iMWriting", + "originalName": "iA Writer", + "declaresRFN": true, + "version": "0-unstable-2024-04-12", + "longDescription": "A heavy modification of IBM's Plex font", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/iA-Writer.tar.xz", + "sha256": "0ifjgx06j40b9m6fvfhd9073ih57m3k9fmrb3v65y10r3mppz6q5" + }, + { + "pname": "inconsolata", + "attrName": "inconsolata", + "dirName": "Inconsolata", + "originalName": "Inconsolata", + "declaresRFN": false, + "version": "3.000", + "longDescription": "Slashed zero, takes inspiration from many different fonts and glyphs, subtle curves in lowercase", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Inconsolata.tar.xz", + "sha256": "1nrbq87zfjsalq8s2hz7b8q7g2was7hsv3p83jrikxkcbk3kjs78" + }, + { + "pname": "inconsolata-go", + "attrName": "inconsolata-go", + "dirName": "InconsolataGo", + "originalName": "InconsolataGo", + "declaresRFN": false, + "version": "1.013", + "longDescription": "Inconsolata with straight quotes", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/InconsolataGo.tar.xz", + "sha256": "0qzbd05njj1xlimdcyk6x3l2q4lwzdjza26d1nrgrjh1mqfmfjrs" + }, + { + "pname": "inconsolata-lgc", + "attrName": "inconsolata-lgc", + "dirName": "InconsolataLGC", + "originalName": "Inconsolata LGC", + "declaresRFN": false, + "version": "1.5.2", + "longDescription": "Inconsolata with added the Cyrillic alphabet", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/InconsolataLGC.tar.xz", + "sha256": "1ks9x6sis49syzr50giv6grgks3ikc48f2j44d8v1960csngiv8i" + }, + { + "pname": "intone-mono", + "attrName": "intone-mono", + "dirName": "IntoneMono", + "originalName": "Intel One Mono", + "declaresRFN": true, + "version": "1.3.0", + "longDescription": "Expressive monospaced font family that’s built with clarity, legibility, and the needs of developers in mind", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/IntelOneMono.tar.xz", + "sha256": "012d6aw6709lb2j08sajnizv0x3n7qk687spj9bjzq42qk28mjli" + }, + { + "pname": "iosevka", + "attrName": "iosevka", + "dirName": "Iosevka", + "originalName": "Iosevka", + "declaresRFN": false, + "version": "29.0.4", + "longDescription": "Narrow and horizontally tight characters, slashed zero", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Iosevka.tar.xz", + "sha256": "1ysgcvqwcrcwg5qnis629pjlpizp2p2m6v5n1igvhny9qc1awwbb" + }, + { + "pname": "iosevka-term", + "attrName": "iosevka-term", + "dirName": "IosevkaTerm", + "originalName": "Iosevka Term", + "declaresRFN": false, + "version": "29.0.4", + "longDescription": "A narrower variant focusing terminal uses: Arrows and geometric symbols will be narrow to follow typical terminal usages", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/IosevkaTerm.tar.xz", + "sha256": "07jl1w5bwxr54c43afdfdz57n4mjv0mlcmgsipbzvh0cm0f0pdfp" + }, + { + "pname": "iosevka-term-slab", + "attrName": "iosevka-term-slab", + "dirName": "IosevkaTermSlab", + "originalName": "Iosevka Term Slab", + "declaresRFN": false, + "version": "29.0.4", + "longDescription": "Nice as Iosevka but with slab serifs", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/IosevkaTermSlab.tar.xz", + "sha256": "1gfhp37l39idq77gix7xb65893xfzka3y9jhsqv8j5mq0j9fhm44" + }, + { + "pname": "jetbrains-mono", + "attrName": "jetbrains-mono", + "dirName": "JetBrainsMono", + "originalName": "JetBrains Mono", + "declaresRFN": false, + "version": "2.304", + "longDescription": "JetBrains officially created font for developers", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/JetBrainsMono.tar.xz", + "sha256": "0n6lgrjk9a4b4w0y7rsv3hh73adih3m8wblrjhgfd25acaz8qzrk" + }, + { + "pname": "lekton", + "attrName": "lekton", + "dirName": "Lekton", + "originalName": "Lekton", + "declaresRFN": false, + "version": "34", + "longDescription": "Very light and thin characters, sharp m's, `0` and `O` very similar", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Lekton.tar.xz", + "sha256": "0sz4dq81vid0gkmhmglp3xk8w7x8wp9ap5s8wvprad27jncl1rcd" + }, + { + "pname": "liberation", + "attrName": "liberation", + "dirName": "LiterationMono", + "originalName": "Liberation Mono", + "declaresRFN": true, + "version": "2.1.5", + "longDescription": "`0` and `O` very similar, very short tight descenders", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/LiberationMono.tar.xz", + "sha256": "1vjmz2rv3d8mblmdw2kmr7gzvjpqj1zm9qx1m2bk37zq8qap8ahn" + }, + { + "pname": "lilex", + "attrName": "lilex", + "dirName": "Lilex", + "originalName": "Lilex", + "declaresRFN": false, + "version": "2.400", + "longDescription": "Modern with ligatures", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Lilex.tar.xz", + "sha256": "1z7x3ip0cph9yfscxqkljs5mhqi9dxm2868capbbfwn9bggl48bd" + }, + { + "pname": "martian-mono", + "attrName": "martian-mono", + "dirName": "MartianMono", + "originalName": "MartianMono", + "declaresRFN": false, + "version": "1.0.0", + "longDescription": "Free and open-source monospaced font from Evil Martians", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/MartianMono.tar.xz", + "sha256": "1i8kyis4kcanid5jw10c9rd6q44nmv0890s72gqhqm04jj471jav" + }, + { + "pname": "meslo-lg", + "attrName": "meslo-lg", + "dirName": "MesloLG", + "originalName": "Meslo LG", + "declaresRFN": false, + "version": "1.21", + "longDescription": "Slashed zeros, customized version of Apple's Menlo", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Meslo.tar.xz", + "sha256": "1p73vw5kvabp7bml176pyy981r6r11sjnbgpq074820x4rlf1rzv" + }, + { + "pname": "monaspace", + "attrName": "monaspace", + "dirName": "Monaspice", + "originalName": "Monaspace", + "declaresRFN": true, + "version": "1.0.0", + "longDescription": "Five matching fonts all having 'texture healing' to improve legibility", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Monaspace.tar.xz", + "sha256": "0ijy4m7qglnfri9x6d4n4g1ijigknmykwq0q49rswm74kfjxf7mh" + }, + { + "pname": "monofur", + "attrName": "monofur", + "dirName": "Monofur", + "originalName": "Monofur", + "declaresRFN": false, + "version": "1.0", + "longDescription": "Dotted zeros, slightly exaggerated curvy characters, compact characters", + "license": "LicenseRef-Monofur", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Monofur.tar.xz", + "sha256": "1mjzigy6c4dxw30f7f89bc50338iqy28nfg4sfmk2myz15azqc1k" + }, + { + "pname": "monoid", + "attrName": "monoid", + "dirName": "Monoid", + "originalName": "Monoid", + "declaresRFN": false, + "version": "0.61", + "longDescription": "Ligatures, distinguishable glyphs with short ascenders & descenders, large operators & punctuation", + "license": "MIT OR OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Monoid.tar.xz", + "sha256": "0df29zmgvpm1mya4kqkaziq5w1d553iq16hnpacnzaf4jzy10q8y" + }, + { + "pname": "mononoki", + "attrName": "mononoki", + "dirName": "Mononoki", + "originalName": "Mononoki", + "declaresRFN": true, + "version": "1.6", + "longDescription": "Keeps in mind differentiation of characters and resolution sizes", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Mononoki.tar.xz", + "sha256": "1ngmdjjdc5hgh139yfgq5hd7i2rafq34vcr1wgiayxsn0d219700" + }, + { + "pname": "mplus", + "attrName": "mplus", + "dirName": "M+", + "originalName": "MPlus", + "declaresRFN": false, + "version": "2023/09", + "longDescription": "Multiple styles and weights, many glyph sets (e.g. Kana glyphs)", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/MPlus.tar.xz", + "sha256": "0b3ns83hdvr76nrm8dlhsv334sfaz0lab7l67i64x0wgkl7d0m31" + }, + { + "pname": "noto", + "attrName": "noto", + "dirName": "Noto", + "originalName": "Noto", + "declaresRFN": false, + "version": "0-unstable-2024-04-12", + "longDescription": "`0` and `O` very similar, characters are either very curvy or straight lined", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Noto.tar.xz", + "sha256": "0hw591z3yas2pw2dnqngd7hww86s4jg84pswxcfh0990hm8k0cdf" + }, + { + "pname": "open-dyslexic", + "attrName": "open-dyslexic", + "dirName": "OpenDyslexic", + "originalName": "OpenDyslexic", + "declaresRFN": false, + "version": "2.001", + "longDescription": "Designed specifically to alleviate reading errors caused by dyslexia", + "license": "Bitstream-Vera", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/OpenDyslexic.tar.xz", + "sha256": "169jcwdf4fhknfq5gvw4rn2627b3nmam404l5wmlyr79nv99fpk8" + }, + { + "pname": "overpass", + "attrName": "overpass", + "dirName": "Overpass", + "originalName": "Overpass", + "declaresRFN": false, + "version": "3.0.5", + "longDescription": "An open source font family inspired by Highway Gothic", + "license": "OFL-1.1-no-RFN or LGPL-2.1-only", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Overpass.tar.xz", + "sha256": "0p2i5fjkkijb26fnhssvc1glbwzmm3gbbhyw9q1s43m6x2gfnnpk" + }, + { + "pname": "profont", + "attrName": "profont", + "dirName": "ProFont", + "originalName": "ProFont", + "declaresRFN": false, + "version": "2.3/2.2", + "longDescription": "Looks best with anti-aliasing turned off, squared off character corners, vertically tight small `s`", + "license": "MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/ProFont.tar.xz", + "sha256": "1bh32vqxfsdfwvrhzhb5y5mxdnmylj4ypf5riqb3jjk1wkgp3cic" + }, + { + "pname": "proggy-clean-tt", + "attrName": "proggy-clean-tt", + "dirName": "ProggyClean", + "originalName": "ProggyCleanTT", + "declaresRFN": false, + "version": "2004/04/15", + "longDescription": "Designed particularly for use at small point sizes", + "license": "MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/ProggyClean.tar.xz", + "sha256": "022s51gkabignr96apw2m6zvxcnlfrg8ccj5sz8nfwax31fa4a85" + }, + { + "pname": "recursive-mono", + "attrName": "recursive-mono", + "dirName": "RecMono", + "originalName": "Recursive Mono", + "declaresRFN": false, + "version": "1.085", + "longDescription": "inspired by casual script signpainting, 4 variants", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Recursive.tar.xz", + "sha256": "0dnvh6dqc3p3n73h932ryrb11s4ixnnlinhngdv9npnmvkfzkiw4" + }, + { + "pname": "roboto-mono", + "attrName": "roboto-mono", + "dirName": "RobotoMono", + "originalName": "Roboto Mono", + "declaresRFN": false, + "version": "3.0", + "longDescription": "Dashed zero, curved and straight character lines", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/RobotoMono.tar.xz", + "sha256": "10qbxw7dksf1z9kmhh9aijz6a9p8v8gqh980yc3jjzxwpmnzs9n5" + }, + { + "pname": "shure-tech-mono", + "attrName": "shure-tech-mono", + "dirName": "ShureTechMono", + "originalName": "Share Tech Mono", + "declaresRFN": true, + "version": "1.003", + "longDescription": "Dotted zeros, distinguishable 1 and l, curved and straight character lines", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/ShareTechMono.tar.xz", + "sha256": "1y09ifwnvqa4lja1b0fg1mpziddwzn5irqxxz902qkdax0r32acl" + }, + { + "pname": "sauce-code-pro", + "attrName": "sauce-code-pro", + "dirName": "SauceCodePro", + "originalName": "Source Code Pro", + "declaresRFN": true, + "version": "2.042", + "longDescription": "Monospaced font family for user interface and coding environments", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/SourceCodePro.tar.xz", + "sha256": "1v7azjj28pgyqfdfwwxa4ma7pp1bj9ppi32kb88hmgw0vk4ai8d1" + }, + { + "pname": "space-mono", + "attrName": "space-mono", + "dirName": "SpaceMono", + "originalName": "Space Mono", + "declaresRFN": false, + "version": "1.001", + "longDescription": "Squarish character lines, dotted zero, aggressive parethesis", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/SpaceMono.tar.xz", + "sha256": "1y1kv87wydag6v9a05lj8jp1v2a13avrhxl36flg7mzc28aja3cx" + }, + { + "pname": "symbols-only", + "attrName": "symbols-only", + "dirName": "Symbols", + "originalName": "Symbols Only", + "declaresRFN": false, + "version": "0-unstable-2024-04-12", + "longDescription": "Just the Nerd Font Icons. I.e Symbol font only", + "license": "MIT", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/NerdFontsSymbolsOnly.tar.xz", + "sha256": "08cjlikhl823afiasgawwbm3z84bfbwiln15l1b8mpa9gycr1a7k" + }, + { + "pname": "terminess-ttf", + "attrName": "terminess-ttf", + "dirName": "Terminess", + "originalName": "Terminus", + "declaresRFN": true, + "version": "4.49.2", + "longDescription": "Squarish characters that are slightly askew", + "license": "OFL-1.1-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Terminus.tar.xz", + "sha256": "052nz47056mlk5p6hrmcklx1g5q0vf9dmvhz3lb7w4apky5rqrwg" + }, + { + "pname": "tinos", + "attrName": "tinos", + "dirName": "Tinos", + "originalName": "Tinos", + "declaresRFN": false, + "version": "1.23", + "longDescription": "Some similarities to Times New Roman, designed by Steve Matteson, includes pan-European WGL character set", + "license": "Apache-2.0", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Tinos.tar.xz", + "sha256": "0vphrfy1gibl4xsxfijz3bd92p8f50s0xzwinqbpsa48klg6hx87" + }, + { + "pname": "ubuntu", + "attrName": "ubuntu", + "dirName": "Ubuntu", + "originalName": "Ubuntu", + "declaresRFN": false, + "version": "0.83", + "longDescription": "Specially created for Ubuntu", + "license": "LicenseRef-UbuntuFont", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/Ubuntu.tar.xz", + "sha256": "05nspzvg53f9cnp0bf96m92s0ls8wp4d9jbp6r35sij8wjznf7xs" + }, + { + "pname": "ubuntu-mono", + "attrName": "ubuntu-mono", + "dirName": "UbuntuMono", + "originalName": "Ubuntu Mono", + "declaresRFN": false, + "version": "0.80", + "longDescription": "Dotted zeros, used the `n`, `o`, `H` & `O` Latin characters as a base for design", + "license": "LicenseRef-UbuntuFont", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/UbuntuMono.tar.xz", + "sha256": "103rpykkpcmklmv8l3qn34glkzmkfwydq00h1ykjq8ahy8flnwvb" + }, + { + "pname": "ubuntu-sans", + "attrName": "ubuntu-sans", + "dirName": "UbuntuSans", + "originalName": "Ubuntu Sans", + "declaresRFN": false, + "version": "1.004", + "longDescription": "Refreshed version of Ubuntu and Ubuntu Mono fonts", + "license": "LicenseRef-UbuntuFont", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/UbuntuSans.tar.xz", + "sha256": "02acj9xzh3r1z2jia9zziwxrgxsz5k5q8i6nfqqzqx3wdgf4pxrz" + }, + { + "pname": "victor-mono", + "attrName": "victor-mono", + "dirName": "VictorMono", + "originalName": "Victor Mono", + "declaresRFN": false, + "version": "1.5.6", + "longDescription": "Clean, crisp and narrow, with a large x-height and clear punctuation", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/VictorMono.tar.xz", + "sha256": "1k85nx92qznqv785sz6ywdgbj2m8i6s3xhlcnqg7fsxdnrwgvfa4" + }, + { + "pname": "zed-mono", + "attrName": "zed-mono", + "dirName": "ZedMono", + "originalName": "Zed Mono", + "declaresRFN": false, + "version": "1.2.0", + "longDescription": "Zed Mono is a more rounded version of Iosevka", + "license": "OFL-1.1-no-RFN", + "url": "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.2.1/ZedMono.tar.xz", + "sha256": "1jy63g1ai5h38krbxi2gkk61zb6v9ls9x80pgd09x4cbafsifmcx" + } +] diff --git a/pkgs/data/fonts/nerdfonts/version.nix b/pkgs/data/fonts/nerd-fonts/release-version.json similarity index 100% rename from pkgs/data/fonts/nerdfonts/version.nix rename to pkgs/data/fonts/nerd-fonts/release-version.json diff --git a/pkgs/data/fonts/nerd-fonts/update.js b/pkgs/data/fonts/nerd-fonts/update.js new file mode 100644 index 0000000000000..a6de983ebb908 --- /dev/null +++ b/pkgs/data/fonts/nerd-fonts/update.js @@ -0,0 +1,74 @@ +const RELEASE_VERSION_FILENAME = "release-version.json"; +const RELEASE_INFO_URL = "https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest"; +const PKGS_INFO_FILENAME = "fonts.json"; + +const getFontsInfoUrl = (tag) => `https://raw.githubusercontent.com/ryanoasis/nerd-fonts/refs/tags/${tag}/bin/scripts/lib/fonts.json`; + +const fetchJSON = (url) => JSON.parse(std.urlGet(url).split("\r\n").at(-1)); + +const convertAttrName = (formerAttrName) => { + if (/^\d/u.test(formerAttrName)) { + return "_" + formerAttrName; + } else { + return formerAttrName; + } +}; + +const convertVersion = (formerVersion, dateString) => { + if (/^\d/u.test(formerVersion)) { + return formerVersion; + } else { + return "0-unstable-" + dateString; + } +}; + +let formerReleaseVersion = JSON.parse(std.loadFile(RELEASE_VERSION_FILENAME)); +let releaseInfo = fetchJSON(RELEASE_INFO_URL); +let tag = releaseInfo.tag_name; +let releaseVersion = tag.split("v")[1]; + +if (releaseVersion === formerReleaseVersion) { + std.exit(1); +} else { + let fonts = fetchJSON(getFontsInfoUrl(tag)).fonts; + + let pkgsInfo = fonts.map(font => { + let pname = font.caskName.toLowerCase(); + + let url = releaseInfo.assets + .find(asset => asset.name === font.folderName + ".tar.xz") + .browser_download_url; + + let sha256 = (() => { + let f = std.popen(`nix-prefetch-url ${url} --unpack`, "r"); + let result = f.getline(); + f.close(); + return result; + })(); + + return ({ + pname: pname, + attrName: convertAttrName(pname), + dirName: font.patchedName.replaceAll(/\s+/gu, ""), + originalName: font.unpatchedName, + declaresRFN: font.RFN, + version: convertVersion(font.version, releaseInfo.published_at.split("T")[0]), + longDescription: font.description, + license: font.licenseId, + url: url, + sha256: sha256, + }); + }); + + (() => { + let f = std.open(PKGS_INFO_FILENAME, "w"); + f.puts(JSON.stringify(pkgsInfo)); + f.close(); + })(); + + (() => { + let f = std.open(RELEASE_VERSION_FILENAME, "w"); + f.puts(JSON.stringify(releaseVersion)); + f.close(); + })(); +} diff --git a/pkgs/data/fonts/nerd-fonts/update.sh b/pkgs/data/fonts/nerd-fonts/update.sh new file mode 100755 index 0000000000000..0bfb89772ea9b --- /dev/null +++ b/pkgs/data/fonts/nerd-fonts/update.sh @@ -0,0 +1,12 @@ +#! /usr/bin/env nix-shell +#! nix-shell -p curl quickjs-ng jsonfmt -i bash +set -eu -o pipefail + +dir_name="$(dirname "$0")" +update_script_filename=update.js +pkgs_info_filename=fonts.json +release_version_filename=release-version.json + +cd "$dir_name" +qjs --script --std $update_script_filename +jsonfmt -w $pkgs_info_filename $release_version_filename diff --git a/pkgs/data/fonts/nerdfonts/default.nix b/pkgs/data/fonts/nerdfonts/default.nix deleted file mode 100644 index b2576d0fca468..0000000000000 --- a/pkgs/data/fonts/nerdfonts/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ stdenv -, fetchurl -, lib -# To select only certain fonts, put a list of strings to `fonts`: every key in -# ./shas.nix is an optional font -, fonts ? [] -# Whether to enable Windows font variants, their internal font name is limited -# to 31 characters -, enableWindowsFonts ? false -}: - -let - # both of these files are generated via ./update.sh - version = import ./version.nix; - fontsShas = import ./shas.nix; - knownFonts = builtins.attrNames fontsShas; - selectedFonts = if (fonts == []) then - knownFonts - else - let unknown = lib.subtractLists knownFonts fonts; in - if (unknown != []) then - throw "Unknown font(s): ${lib.concatStringsSep " " unknown}" - else - fonts - ; - selectedFontsShas = lib.attrsets.genAttrs selectedFonts ( - fName: - fontsShas."${fName}" - ); - srcs = lib.attrsets.mapAttrsToList ( - fName: - fSha: - (fetchurl { - url = "https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/${fName}.tar.xz"; - sha256 = fSha; - }) - ) selectedFontsShas; -in - -stdenv.mkDerivation (finalAttrs: { - inherit version; - inherit srcs; - pname = "nerdfonts"; - sourceRoot = "."; - buildPhase = '' - echo "selected fonts are ${toString selectedFonts}" - ls *.otf *.ttf - ''; - installPhase = '' - find -name \*.otf -exec mkdir -p $out/share/fonts/opentype/NerdFonts \; -exec mv {} $out/share/fonts/opentype/NerdFonts \; - find -name \*.ttf -exec mkdir -p $out/share/fonts/truetype/NerdFonts \; -exec mv {} $out/share/fonts/truetype/NerdFonts \; - ${lib.optionalString (! enableWindowsFonts) '' - rm -rfv $out/share/fonts/opentype/NerdFonts/*Windows\ Compatible.* - rm -rfv $out/share/fonts/truetype/NerdFonts/*Windows\ Compatible.* - ''} - ''; - passthru.updateScript = ./update.sh; - - meta = with lib; { - description = "Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts"; - longDescription = '' - Nerd Fonts is a project that attempts to patch as many developer targeted - and/or used fonts as possible. The patch is to specifically add a high - number of additional glyphs from popular 'iconic fonts' such as Font - Awesome, Devicons, Octicons, and others. - ''; - homepage = "https://nerdfonts.com/"; - license = licenses.mit; - maintainers = with maintainers; [ doronbehar ]; - hydraPlatforms = []; # 'Output limit exceeded' on Hydra - }; -}) diff --git a/pkgs/data/fonts/nerdfonts/shas.nix b/pkgs/data/fonts/nerdfonts/shas.nix deleted file mode 100644 index b7ad0b67aa1b8..0000000000000 --- a/pkgs/data/fonts/nerdfonts/shas.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - "0xProto" = "09q4ipl3vvav3jbs0s14fqmd2wk70mc7i8mmplpj20jwcicm05ng"; - "3270" = "0zcj5xhylyqxpwn6dzp28kh8xybhh4y9lva3smcqs7iklhbf8s31"; - "Agave" = "1xxylrjb0zbq3kj14fx5d3lpb7abl0br6mkj961i391qyqlx01y3"; - "AnonymousPro" = "1lq9wkf8c153jkjmhnddih12y9xd4gabbkgac0vx9j98hmy7yjqy"; - "Arimo" = "1f7zljmljrp1dxkrhkyz8zh9ddv7l7m9br6gaygzxr26bq0vrwr0"; - "AurulentSansMono" = "0wlwwgp1w7rqvqx66dkqwhz5flw75620fj9fb795hakpkjiya6yp"; - "BigBlueTerminal" = "115cxnll1iyj75f5wi7b7pi5hgfa3b5kbx269alm9183h284lb23"; - "BitstreamVeraSansMono" = "1s6jpg0vrdwgi9qyn0mbcy8r7h1lqw8z6q39wiin61szfn642a2k"; - "CascadiaCode" = "1sg6czl3km7yi70vdcyb0ff1xkq1p4nalj0yh164gan3psp9mxss"; - "CascadiaMono" = "0rrknf86kdwyjpnryp5870nmnq2sxjda8pgs93z23lh7hw758wln"; - "CodeNewRoman" = "0p1wkmpzcrxw8qv5lf9fwsxqpjglhwim83amf7i8mmxdx1drzlj5"; - "ComicShannsMono" = "1p35nmzl51mn2mk0g9fdcawvssv4v7bklxxmdx99357ihnlka26w"; - "CommitMono" = "0jjzi98i28s3z2x8v7rakcdhgdf7jxzagj8snrylw2mvwn7mlgqp"; - "Cousine" = "1ccq3sp8fqbi0njm9w2p6cf5r7avpan5fklwzpx4mknwbdqlrwdq"; - "D2Coding" = "1c0chgbsmzlgq0vinbcz7ydkdhnram8cif8zx8kkpha31abna5n0"; - "DaddyTimeMono" = "1nz4g26a4dx7ng5nv6bc4hg474inan1c00c86mdlmvl2vgmx6zbf"; - "DejaVuSansMono" = "12x18i15723hxc1l6ng92m77wycjk0d6r15j34n1zsww5r6xwjxr"; - "DroidSansMono" = "1mqd1qqbs9dxwmi98i4xw88c68l1bww1sqlsmxmn86368rjh14fk"; - "EnvyCodeR" = "197g4jaljcb1yncn9rvh17n077p7bq0v59lvb9vqkq3lms5lzjni"; - "FantasqueSansMono" = "079mk8xrri4r1d5k1w5fv1hb0hp3w499csirkd6yriss35sbhv9d"; - "FiraCode" = "1i1vw65f00n6vjinyqr1bq5ni5r6g8cjinrfl5zhlqm0gagv5x6y"; - "FiraMono" = "1i9bfxblx568wsjq7ks1kyyfn9k36i4r2an4n45mb46swc94n8n0"; - "GeistMono" = "0wvc9hqkh7ap3ysklcin8k72706l72p2wyqv3bg5brzcmwcpy90g"; - "Go-Mono" = "0j6rr0r7418f8a5bmxbagpmcf7bas2n53f0hg835zp2ikx9cx924"; - "Gohu" = "0h8hjiqs3f6xwn7g4wg12xim65ybw2546nlf5p9ip4ymr7x17dks"; - "Hack" = "1wxmd4jr4p11cfhzs5chyh649vps6sdz4bq28204npkd7wzh5fc9"; - "Hasklig" = "1nja4r8sn67g3gn85xhb1h7p1pi96wl0hpg5b5gyd1z5llbgzc2g"; - "HeavyData" = "1a3a1pixv97wlnai24zb8dhkzxb2llcarhjkfrgd4syhn37sdf7n"; - "Hermit" = "1bh18rzwma7gzrx3ybw8g2s9k5xv7wx8ybnyas3qaxb03fpjqm93"; - "iA-Writer" = "0vsppg62l35zhzlsa0fwczv09pk1nhrag9xhcaadipd962dv7c45"; - "IBMPlexMono" = "0hd04z17l2p21hij4a0gmwnlfxs7s8qqh08zf4pzqld10557gqlp"; - "Inconsolata" = "1xy3h05zy49h91k7fqk8934p1f776w46i0bh510addg12w8mm7rc"; - "InconsolataGo" = "0hcvh3s2rnnir03pszfmmwhbdsapx1b516phhjhb4wl0dqma9q39"; - "InconsolataLGC" = "0bfwhzbz422kfdv9ppr83cc2aqqdn7g49f73zipl4yp5636gi5ks"; - "IntelOneMono" = "0388390dlcprxhxxl57gy8rllwk8wsd92b5xwnqwb5f394gbc5m0"; - "Iosevka" = "0dzkcn277jxiqrrqkyigw6jgd4lp9411r28rkpkwx6js6px27q8v"; - "IosevkaTerm" = "1xccqkydkhmhq8akk23kkypqzcc2svyicxv9gblwzwbndjrfgmdm"; - "IosevkaTermSlab" = "1svig63li8mjj2dkgiawgb82gpk8vkrkhih5cp0a6174bh4gycii"; - "JetBrainsMono" = "01j0rkgrix7mdp9fx0y8zzk1kh40yfcp932p0r5y666aq4mq5y3c"; - "Lekton" = "00cm8ni3cnmgzwj1ypvpcy8gvnlz31la51j411dpsdqsclbcp0i2"; - "LiberationMono" = "1941pgw723a6my44g6idi56a88qvsi8lj3wl7slpr5l3pmfda2lx"; - "Lilex" = "0qz23h6a77i4n8nmhb7hc56mkiwn3pj1s6dbl2v53fvypwghswm2"; - "MartianMono" = "0zfcvi150yn274i41n66zr20hqgqb0r5v75q21bbgqvaysl4wj32"; - "Meslo" = "1sjrsr7i3diz4h7wkrl8va7b40g4m1432dz6bpbm2nmp89aszg8s"; - "Monaspace" = "0il36cm37pc6ndp96j32j0fqpqvwyv2xm3jr7d3zxwax1lcfilp5"; - "Monofur" = "10gzx2r5a5f5jl192c6cwsil5k57aslmryfnilkv4g8417xmn0zb"; - "Monoid" = "1fhsb326lc093ckrq2kz4vhr3ibrgp8y0mwa3qwdbapldxazz9f7"; - "Mononoki" = "18zp94dnv6kp8l58151dybjf2w1gi99nh1rw098hkrf52gfrfdpb"; - "MPlus" = "0x7yvpkn32x50y9zpdpjrp1gvwwp4fsmjbqbnfzy14xhi03p0q2w"; - "NerdFontsSymbolsOnly" = "0y4r1rid5sjd9ihi6nkwy0sja792aghg21bpl3ri029b9pifx8xp"; - "Noto" = "0vq9lgf4j6pi7pw3bfgfzkcdixnhikf4yys8fr0qql7mkwhj3rjb"; - "OpenDyslexic" = "1yl1fm4pfjvxq411m6f8nycqjnpnhkllmlx16wjrjfqpaf63mm4n"; - "Overpass" = "1plcn2qx2b08va65zagn1ybkh850157ii7x20nnrhp0h5f4rddzw"; - "ProFont" = "11c3shv09dssjbjwa44y64dwq7dxn3gs23bfgvhkv51vshsx0fzy"; - "ProggyClean" = "1l822wqrz7xmgnw535i9vl9gwjl4h037hi3xl0g4907kcdxwan0s"; - "Recursive" = "1fngqsl1shbfbb1wcx77di42g65lm9f5fcw93m8dcvdzk5lxpxz5"; - "RobotoMono" = "0g6yvz4vpfcylnshhyhwy5llz61n8m0a0vp4jgjhiir5svcd9krw"; - "ShareTechMono" = "0mxsywg4gns31yzh1256y7pkbh0m6n3rf8gbb55mxw219ngskkyv"; - "SourceCodePro" = "088vi947kavk1pkvbl68kv7nz84yvfkj725n2zn7ypq354kkm92n"; - "SpaceMono" = "0f4kcm4i3y11mpxb9anmn8759zpv3lvril4shp3d4mfc0k3dgfdn"; - "Terminus" = "04kzc594sb5vk8fd3ww9ip7jsy4vi6wmxdf6vzsvb2fgd98ck335"; - "Tinos" = "14c31qv3ik0in44k98zjn398cffwgq8z7d5lx7sk6iv12hikrd11"; - "Ubuntu" = "1bgk4hx26qn5ylsydsy9655isz05ir7154pv8dy4x5rpr144s9ba"; - "UbuntuMono" = "15kkgx6i4f7zn6fdaw2dqqw3hcpl3pi4cy4g5jx67af8qlhqarrb"; - "UbuntuSans" = "0jj4v198zshwhns5swrh02h2np3wgnv8lacn8b7jhmcd575cgy1y"; - "VictorMono" = "03rh7rc6a934sgd1bs7h7y1swqwbv3g7zi624k6hd8v1m3f0j6xa"; - "ZedMono" = "0yhb9fp7ahw8niki1njzk8pbl0iy53pgf7gx5yfc2ass9vjwky9d"; -} diff --git a/pkgs/data/fonts/nerdfonts/update.sh b/pkgs/data/fonts/nerdfonts/update.sh deleted file mode 100755 index 03acd617e6f0f..0000000000000 --- a/pkgs/data/fonts/nerdfonts/update.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i bash -p nix-prefetch jq - -latest_release=$(curl --silent https://api.github.com/repos/ryanoasis/nerd-fonts/releases/latest) -version=$(jq -r '.tag_name' <<<"$latest_release") - -dirname="$(dirname "$0")" -echo \""${version#v}"\" >"$dirname/version-new.nix" -if diff -q "$dirname/version-new.nix" "$dirname/version.nix"; then - echo No new version available, current: $version - exit 0 -else - echo Updated to version "$version" - mv "$dirname/version-new.nix" "$dirname/version.nix" -fi - -printf '{\n' > "$dirname/shas.nix" - -while - read -r name - read -r url -do - printf ' "%s" = "%s";\n' "${name%%.*}" "$(nix-prefetch-url "$url")" >>"$dirname/shas.nix" -done < <(jq -r '.assets[] | select(.name | test("xz")) | .name, .browser_download_url' <<<"$latest_release") - -printf '}\n' >> "$dirname/shas.nix" diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index cd0b0dffff68f..3317c1282b594 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -363,6 +363,7 @@ mapAliases { fileschanged = throw "'fileschanged' has been removed as it is unmaintained upstream"; # Added 2024-04-19 finger_bsd = bsd-finger; fingerd_bsd = bsd-fingerd; + fira-code-nerdfont = lib.warn "fira-code-nerdfont is redundant. Use nerd-fonts.fira-code instead." nerd-fonts.fira-code; # Added 2024-11-10 firefox-esr-115 = throw "The Firefox 115 ESR series has reached its end of life. Upgrade to `firefox-esr` or `firefox-esr-128` instead."; firefox-esr-115-unwrapped = throw "The Firefox 115 ESR series has reached its end of life. Upgrade to `firefox-esr-unwrapped` or `firefox-esr-128-unwrapped` instead."; firefox-wayland = firefox; # Added 2022-11-15 @@ -521,6 +522,7 @@ mapAliases { imagemagick7 = throw "'imagemagick7' has been renamed to/replaced by 'imagemagick'"; # Converted to throw 2024-10-17 imagemagick7_light = throw "'imagemagick7_light' has been renamed to/replaced by 'imagemagick_light'"; # Converted to throw 2024-10-17 immersed-vr = lib.warn "'immersed-vr' has been renamed to 'immersed'" immersed; # Added 2024-08-11 + inconsolata-nerdfont = lib.warn "inconsolata-nerdfont is redundant. Use nerd-fonts.inconsolata instead." nerd-fonts.inconsolata; # Added 2024-11-10 incrtcl = tclPackages.incrtcl; # Added 2024-10-02 input-utils = throw "The input-utils package was dropped since it was unmaintained."; # Added 2024-06-21 index-fm = libsForQt5.mauiPackages.index; # added 2022-05-17 @@ -822,6 +824,7 @@ mapAliases { nextcloud27Packages = throw "Nextcloud27 is EOL!"; # Added 2024-06-25 nagiosPluginsOfficial = monitoring-plugins; neochat = libsForQt5.kdeGear.neochat; # added 2022-05-10 + nerdfonts = throw "nerdfonts has been separated into individual font packages under the namespace nerd-fonts"; # Added 2024-11-09 newlibCross = newlib; # Added 2024-09-06 newlib-nanoCross = newlib-nano; # Added 2024-09-06 nitrokey-udev-rules = libnitrokey; # Added 2023-03-25 @@ -1187,6 +1190,7 @@ mapAliases { teck-programmer = throw "teck-programmer was removed because it was broken and unmaintained"; # added 2024-08-23 teleport_13 = throw "teleport 13 has been removed as it is EOL. Please upgrade to Teleport 14 or later"; # Added 2024-05-26 teleport_14 = throw "teleport 14 has been removed as it is EOL. Please upgrade to Teleport 15 or later"; # Added 2024-10-18 + terminus-nerdfont = lib.warn "terminus-nerdfont is redundant. Use nerd-fonts.terminess-ttf instead." nerd-fonts.terminess-ttf; # Added 2024-11-10 temurin-bin-20 = throw "Temurin 20 has been removed as it has reached its end of life"; # Added 2024-08-01 temurin-jre-bin-20 = throw "Temurin 20 has been removed as it has reached its end of life"; # Added 2024-08-01 temurin-bin-19 = throw "Temurin 19 has been removed as it has reached its end of life"; # Added 2024-08-01 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e19da69da50b..e7ef7427fa2be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4605,7 +4605,7 @@ with pkgs; navilu-font = callPackage ../data/fonts/navilu { stdenv = stdenvNoCC; }; - nerdfonts = callPackage ../data/fonts/nerdfonts { }; + nerd-fonts = recurseIntoAttrs (callPackage ../data/fonts/nerd-fonts { }); netcdf-mpi = netcdf.override { hdf5 = hdf5-mpi.override { usev110Api = true; }; @@ -13181,9 +13181,6 @@ with pkgs; fira-code = callPackage ../data/fonts/fira-code { }; fira-code-symbols = callPackage ../data/fonts/fira-code/symbols.nix { }; - fira-code-nerdfont = nerdfonts.override { - fonts = [ "FiraCode" ]; - }; flat-remix-icon-theme = callPackage ../data/icons/flat-remix-icon-theme { inherit (plasma5Packages) breeze-icons; @@ -13234,10 +13231,6 @@ with pkgs; inconsolata-lgc = callPackage ../data/fonts/inconsolata/lgc.nix { }; - inconsolata-nerdfont = nerdfonts.override { - fonts = [ "Inconsolata" ]; - }; - input-fonts = callPackage ../data/fonts/input-fonts { }; iosevka = callPackage ../data/fonts/iosevka { }; @@ -13399,10 +13392,6 @@ with pkgs; inherit (libsForQt5) breeze-icons; }; - terminus-nerdfont = nerdfonts.override { - fonts = [ "Terminus" ]; - }; - tex-gyre = callPackages ../data/fonts/tex-gyre { }; tex-gyre-math = callPackages ../data/fonts/tex-gyre-math { };