2022-11-02 22:02:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, unzip
|
|
|
|
, fetchurl
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
maple-font = { pname, version, sha256, desc }: stdenv.mkDerivation
|
|
|
|
rec{
|
|
|
|
|
|
|
|
inherit pname version desc;
|
|
|
|
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 {} \;
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2023-02-09 11:40:11 +00:00
|
|
|
Mono = maple-font {
|
2022-11-02 22:02:43 +00:00
|
|
|
pname = "MapleMono";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "6.1";
|
|
|
|
sha256 = "sha256-JWyZH2F9lwWt9ROhuOtVf8HIjUAWkhCbXium0iNQry8=";
|
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-02-09 11:40:11 +00:00
|
|
|
version = "6.1";
|
|
|
|
sha256 = "sha256-z0qoPMvowasHRK1IUMnx+lufUXqZkT3WBLtpEkP4V4I=";
|
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";
|
|
|
|
version = "6.1";
|
|
|
|
sha256 = "sha256-cp7pASXEiP8Td8yR+5hKpZyTST0o0pxgck4llHps4go=";
|
|
|
|
desc = "Nerd Font SC";
|
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|