diff --git a/pkgs/data/fonts/maple-font/default.nix b/pkgs/data/fonts/maple-font/default.nix new file mode 100644 index 00000000000..30e0c1a8b67 --- /dev/null +++ b/pkgs/data/fonts/maple-font/default.nix @@ -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"; + }; + +} + + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc860b31194..8b977c772de 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 {};