nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, unzip
4, fetchurl
5}:
6
7let
8 maple-font = { pname, sha256, desc }: stdenv.mkDerivation
9 rec{
10
11 inherit pname desc;
12 version = "6.3";
13 src = fetchurl {
14 url = "https://github.com/subframe7536/Maple-font/releases/download/v${version}/${pname}.zip";
15 inherit sha256;
16 };
17
18 # Work around the "unpacker appears to have produced no directories"
19 # case that happens when the archive doesn't have a subdirectory.
20 setSourceRoot = "sourceRoot=`pwd`";
21 nativeBuildInputs = [ unzip ];
22 installPhase = ''
23 find . -name '*.ttf' -exec install -Dt $out/share/fonts/truetype {} \;
24 find . -name '*.otf' -exec install -Dt $out/share/fonts/opentype {} \;
25 find . -name '*.woff2' -exec install -Dt $out/share/fonts/woff2 {} \;
26 '';
27
28 meta = with lib; {
29 homepage = "https://github.com/subframe7536/Maple-font";
30 description = ''
31 Open source ${desc} font with round corner and ligatures for IDE and command line
32 '';
33 license = licenses.ofl;
34 platforms = platforms.all;
35 maintainers = with maintainers; [ oluceps ];
36 };
37 };
38
39in
40{
41 Mono = maple-font {
42 pname = "MapleMono";
43 sha256 = "sha256-Ap4OwP/QGFz9+xn12rekia1/pwRxZvv+H+ZmZiXcxcY=";
44 desc = "monospace";
45 };
46
47 NF = maple-font {
48 pname = "MapleMono-NF";
49 sha256 = "sha256-WZHFQRG+81TF5YgOT249c8VA8vAvYowiQx/pqsDuJ4o=";
50 desc = "Nerd Font";
51 };
52
53 SC-NF = maple-font {
54 pname = "MapleMono-SC-NF";
55 sha256 = "sha256-26odkmMljEwstRywDYJ7Dst5pfOXrtQTcrFFxbRwHcA=";
56 desc = "Nerd Font SC";
57 };
58
59 opentype = maple-font {
60 pname = "MapleMono-otf";
61 sha256 = "sha256-u2IuymjiosoSbdIW7h2QalagTI+eDMRSuhLgXy5RdRA=";
62 desc = "OpenType";
63 };
64
65 woff2 = maple-font {
66 pname = "MapleMono-woff2";
67 sha256 = "sha256-iv6Q/aYMlAkhaem8tFWAzqc9mVgWQXghBzcHJz1dg/Y=";
68 desc = "WOFF2.0";
69 };
70}
71
72