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;
|
|
|
|
version = "6.2";
|
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 {} \;
|
|
|
|
'';
|
|
|
|
|
|
|
|
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-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-KhG0gQRnHFvpoxdcySSEYWDtOgG4xIm8X0Ua9o1aGTw=";
|
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-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-Ov6AEaLy80cwrFtmKWUceI809SwBlHsQf2F86/sc/6A=";
|
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-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-bb62YGzdE9qvlyuZG7YI16gOxWC+AijlRLY8ET+q5Rg=";
|
2023-02-09 11:40:11 +00:00
|
|
|
desc = "Nerd Font SC";
|
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|