blob: 242db08751c29ddf848847762294c8320c450d2a [file] [log] [blame]
Skyler Grey252927a2022-10-18 22:18:15 +01001{ lib
2, fetchFromGitHub
3, stdenv
4,
Skyler Greyf6d69862022-09-11 00:39:50 +01005}:
6stdenv.mkDerivation rec {
7 pname = "nerdfonts-glyphs";
Skyler Grey0c7d0922022-10-30 22:59:22 +00008 version = "2.1.0";
Skyler Greyf6d69862022-09-11 00:39:50 +01009
10 # This uses a sparse checkout because the repo is >2GB without it
11 src = fetchFromGitHub {
12 owner = "ryanoasis";
13 repo = "nerd-fonts";
14 rev = "v${version}";
Skyler Greydb703cc2023-02-19 23:38:47 +000015 sparseCheckout = [ "/src/glyphs" ];
Skyler Grey0c7d0922022-10-30 22:59:22 +000016 sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI=";
Skyler Greyf6d69862022-09-11 00:39:50 +010017 };
18
19 dontBuild = true;
20
21 installPhase = ''
22 mkdir -p $out/bin $out/share/fonts/truetype
23 mkdir -p $out/bin $out/share/fonts/opentype
24 find . -name "*.ttf" -exec mv {} $out/share/fonts/truetype \;
25 find . -name "*.otf" -exec mv {} $out/share/fonts/opentype \;
Skyler Greya93da092022-10-31 00:20:49 +000026
Skyler Greyf6d69862022-09-11 00:39:50 +010027 '';
28
29 meta = with lib; {
30 description = "A nerd-fonts copy that only includes the glyphs (rather than patching)";
31 homepage = "https://nerdfonts.com/";
32 license = licenses.free;
Skyler Grey252927a2022-10-18 22:18:15 +010033 maintainers = with maintainers; [ minion3665 ];
Skyler Greyf6d69862022-09-11 00:39:50 +010034 };
35}