2022-11-02 22:02:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, unzip
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-03-04 12:14:45 +00:00
|
|
|
maple-font = { pname, sha256, desc }: stdenv.mkDerivation
|
2022-11-02 22:02:43 +00:00
|
|
|
rec{
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
inherit pname desc;
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "6.3";
|
2022-11-02 22:02:43 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/subframe7536/Maple-font/releases/download/v${version}/${pname}.zip";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Work around the "unpacker appears to have produced no directories"
|
|
|
|
# case that happens when the archive doesn't have a subdirectory.
|
|
|
|
setSourceRoot = "sourceRoot=`pwd`";
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
installPhase = ''
|
|
|
|
find . -name '*.ttf' -exec install -Dt $out/share/fonts/truetype {} \;
|
2023-04-29 16:46:19 +00:00
|
|
|
find . -name '*.otf' -exec install -Dt $out/share/fonts/opentype {} \;
|
|
|
|
find . -name '*.woff2' -exec install -Dt $out/share/fonts/woff2 {} \;
|
2022-11-02 22:02:43 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/subframe7536/Maple-font";
|
|
|
|
description = ''
|
|
|
|
Open source ${desc} font with round corner and ligatures for IDE and command line
|
|
|
|
'';
|
|
|
|
license = licenses.ofl;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
|
|
|
};
|
|
|
|
};
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
in
|
|
|
|
{
|
2023-02-09 11:40:11 +00:00
|
|
|
Mono = maple-font {
|
2022-11-02 22:02:43 +00:00
|
|
|
pname = "MapleMono";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-Ap4OwP/QGFz9+xn12rekia1/pwRxZvv+H+ZmZiXcxcY=";
|
2022-11-02 22:02:43 +00:00
|
|
|
desc = "monospace";
|
|
|
|
};
|
2023-02-09 11:40:11 +00:00
|
|
|
|
|
|
|
NF = maple-font {
|
2022-11-02 22:02:43 +00:00
|
|
|
pname = "MapleMono-NF";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-WZHFQRG+81TF5YgOT249c8VA8vAvYowiQx/pqsDuJ4o=";
|
2022-11-02 22:02:43 +00:00
|
|
|
desc = "Nerd Font";
|
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
SC-NF = maple-font {
|
|
|
|
pname = "MapleMono-SC-NF";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-26odkmMljEwstRywDYJ7Dst5pfOXrtQTcrFFxbRwHcA=";
|
2023-02-09 11:40:11 +00:00
|
|
|
desc = "Nerd Font SC";
|
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
opentype = maple-font {
|
|
|
|
pname = "MapleMono-otf";
|
|
|
|
sha256 = "sha256-u2IuymjiosoSbdIW7h2QalagTI+eDMRSuhLgXy5RdRA=";
|
|
|
|
desc = "OpenType";
|
|
|
|
};
|
|
|
|
|
|
|
|
woff2 = maple-font {
|
|
|
|
pname = "MapleMono-woff2";
|
|
|
|
sha256 = "sha256-iv6Q/aYMlAkhaem8tFWAzqc9mVgWQXghBzcHJz1dg/Y=";
|
|
|
|
desc = "WOFF2.0";
|
|
|
|
};
|
2022-11-02 22:02:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|