Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 1 | { |
| 2 | lib, |
| 3 | fetchFromGitHub, |
| 4 | stdenv |
| 5 | }: |
| 6 | stdenv.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 | } |