blob: ec96f7420e56de9e205e71d3e3445523fe86aa3b [file] [log] [blame]
Skyler Greyf6d69862022-09-11 00:39:50 +01001{
2 lib,
3 fetchFromGitHub,
4 stdenv
5}:
6stdenv.mkDerivation rec {
7 pname = "nerdfonts-glyphs";
8 version = "2.2.2";
9
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}";
15 sparseCheckout = ''
16 /src/glyphs
17 '';
18 sha256 = "sha256-ePBlEVjzAJ7g6iAGIqPfgZ8bwtNILmyEVm0zD+xNN6k=";
19 };
20
21 dontBuild = true;
22
23 installPhase = ''
24 mkdir -p $out/bin $out/share/fonts/truetype
25 mkdir -p $out/bin $out/share/fonts/opentype
26 find . -name "*.ttf" -exec mv {} $out/share/fonts/truetype \;
27 find . -name "*.otf" -exec mv {} $out/share/fonts/opentype \;
28 '';
29
30 meta = with lib; {
31 description = "A nerd-fonts copy that only includes the glyphs (rather than patching)";
32 homepage = "https://nerdfonts.com/";
33 license = licenses.free;
34 maintainers = with maintainers; [minion3665];
35 };
36}