Merge pull request #189482 from oluceps/add_maple-font

maple-font: init at 5.5
This commit is contained in:
Christian Kögler 2022-10-31 06:28:02 +01:00 committed by GitHub
commit 488936101f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,53 @@
{ 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
{
Mono-v5 = maple-font {
pname = "MapleMono";
version = "5.5";
sha256 = "sha256-xkZ9NefjWHPjWNW8LGM8CgT2Zrg4j1evvx1K56sUzR8=";
desc = "monospace";
};
Mono-NF-v5 = maple-font {
pname = "MapleMono-NF";
version = "5.5";
sha256 = "sha256-cPVGuH1CSfnRvQ4ehBvOVno7CT6Popc1Nnpcn5uJoQY=";
desc = "Nerd Font";
};
}

View file

@ -4483,6 +4483,9 @@ with pkgs;
mapcidr = callPackage ../tools/misc/mapcidr { };
maple-mono = (callPackage ../data/fonts/maple-font { }).Mono-v5;
maple-mono-NF = (callPackage ../data/fonts/maple-font { }).Mono-NF-v5;
marl = callPackage ../development/libraries/marl {};
marlin-calc = callPackage ../tools/misc/marlin-calc {};