nixpkgs/pkgs/data/fonts/maple-font/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

62 lines
1.5 KiB
Nix
Raw Normal View History

2022-09-02 15:39:39 +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-01-15 12:27:36 +00:00
Mono = maple-font {
2022-09-02 15:39:39 +00:00
pname = "MapleMono";
2023-01-15 12:27:36 +00:00
version = "6.1";
sha256 = "sha256-JWyZH2F9lwWt9ROhuOtVf8HIjUAWkhCbXium0iNQry8=";
2022-09-02 15:39:39 +00:00
desc = "monospace";
};
2023-01-15 12:27:36 +00:00
NF = maple-font {
2022-09-02 15:39:39 +00:00
pname = "MapleMono-NF";
2023-01-15 12:27:36 +00:00
version = "6.1";
sha256 = "sha256-z0qoPMvowasHRK1IUMnx+lufUXqZkT3WBLtpEkP4V4I=";
2022-09-02 15:39:39 +00:00
desc = "Nerd Font";
};
2023-01-15 12:27:36 +00:00
SC-NF = maple-font {
pname = "MapleMono-SC-NF";
version = "6.1";
sha256 = "sha256-cp7pASXEiP8Td8yR+5hKpZyTST0o0pxgck4llHps4go=";
desc = "Nerd Font SC";
};
2022-09-02 15:39:39 +00:00
}