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}"; |
Skyler Grey | db703cc | 2023-02-19 23:38:47 +0000 | [diff] [blame] | 15 | sparseCheckout = [ "/src/glyphs" ]; |
Skyler Grey | 0c7d092 | 2022-10-30 22:59:22 +0000 | [diff] [blame] | 16 | sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI="; |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 17 | }; |
| 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 Grey | a93da09 | 2022-10-31 00:20:49 +0000 | [diff] [blame] | 26 | |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 27 | ''; |
| 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 Grey | 252927a | 2022-10-18 22:18:15 +0100 | [diff] [blame] | 33 | maintainers = with maintainers; [ minion3665 ]; |
Skyler Grey | f6d6986 | 2022-09-11 00:39:50 +0100 | [diff] [blame] | 34 | }; |
| 35 | } |