{ pkgs, ... }:
let
  hashes = {
    "MapleMono-TTF" = "sha256-xKGw8fYpcBj0PNqEqz0VKIFebQc9QcIXmLtiVessHtM=";
    "MapleMono-NF-unhinted" = "sha256-1H7w/Ky10TG3rAS7tNAnpWy30xYlhT7MdxLNCQraiTg=";
    "MapleMono-NF-CN-unhinted" = "sha256-Zp4C8JJrCjGLGa1Il1J5RaqpFwu7hO0AETU6IDqoSX8=";
  };
in
rec {
  maple-mono = pkgs.lib.mapAttrs (
    _: maple-pkg:
    maple-pkg.overrideAttrs (
      prev: _: {
        version = "1.0.1+custom";
        src = pkgs.fetchurl {
          url = "https://github.com/jdonszelmann/Maple-font/releases/download/v1.0.1/${prev.pname}.zip";
          hash = hashes.${prev.pname};
        };
      }
    )
  ) pkgs.maple-mono;
  maple-fonts-pack = [
    maple-mono.truetype
    # Maple Mono NF (Ligature unhinted)
    maple-mono.NF-unhinted
    # Maple Mono NF CN (Ligature unhinted)
    maple-mono.NF-CN-unhinted
  ];
}
