Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 1 | { lib |
| 2 | , fetchFromGitHub |
| 3 | , stdenv |
| 4 | , |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 5 | }: |
| 6 | stdenv.mkDerivation rec { |
| 7 | pname = "nerdfonts-glyphs"; |
Skyler Grey | 0c7d092 | 2022-10-30 22:59:22 +0000 | [diff] [blame] | 8 | version = "2.1.0"; |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 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 | ''; |
Skyler Grey | 0c7d092 | 2022-10-30 22:59:22 +0000 | [diff] [blame] | 18 | sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI="; |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 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 \; |
Skyler Grey | a93da09 | 2022-10-31 00:20:49 +0000 | [diff] [blame] | 28 | |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 29 | ''; |
| 30 | |
| 31 | meta = with lib; { |
| 32 | description = "A nerd-fonts copy that only includes the glyphs (rather than patching)"; |
| 33 | homepage = "https://nerdfonts.com/"; |
| 34 | license = licenses.free; |
Skyler Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 35 | maintainers = with maintainers; [ minion3665 ]; |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 36 | }; |
| 37 | } |