update maple font

This commit is contained in:
EdenQwQ 2025-05-31 11:28:02 +08:00
parent c3172230d0
commit 48e00ea4f8
6 changed files with 37 additions and 83 deletions

View file

@ -3,6 +3,5 @@
home.packages = with pkgs; [
pspp
zotero
fiz
];
}

View file

@ -18,7 +18,7 @@ in
};
fonts = {
monospace.name = "Maple Mono";
monospace.package = pkgs.maple-mono.variable;
monospace.package = pkgs.maple-mono-variable;
sansSerif.name = "LXGW WenKai";
sansSerif.package = pkgs.lxgw-wenkai;
serif.name = "LXGW WenKai";

View file

@ -10,8 +10,7 @@
nerd-fonts.hurmit
nerd-fonts.monofur
lxgw-wenkai
maple-mono.NF-CN
maple-mono.variable
maple-mono-variable
];
fonts.fontDir.enable = true;
}

View file

@ -6,8 +6,8 @@
kose-font = pkgs.callPackage ./fonts/kose.nix { };
hugmetight-font = pkgs.callPackage ./fonts/hugmetight.nix { };
custom-colorschemes = pkgs.callPackage ./customColorSchemes { };
fiz = pkgs.callPackage ./fiz.nix { };
hellwm = pkgs.callPackage ./hellwm.nix { };
wallpapers = pkgs.callPackage ./wallpapers.nix { };
wechat = pkgs.callPackage ./wechat.nix { };
maple-mono-variable = pkgs.callPackage ./maple-mono-variable.nix { };
}

View file

@ -1,78 +0,0 @@
# copied from https://github.com/nix-community/nur-combined/blob/main/repos/hhr2020/pkgs/fiz/default.nix
{
lib,
stdenv,
rustPlatform,
fetchNpmDeps,
cargo-tauri,
copyDesktopItems,
glib-networking,
nodejs,
npmHooks,
openssl,
pkg-config,
webkitgtk_4_1,
wrapGAppsHook4,
fetchFromGitHub,
jq,
moreutils,
}:
rustPlatform.buildRustPackage rec {
pname = "fiz";
version = "0.3.5";
src = fetchFromGitHub {
owner = "CrazySpottedDove";
repo = "fiz";
rev = "cae430f74ebaafe9167e7a8698540179162e5d87";
hash = "sha256-8Fyvy52KQyG8+kf9BGUQ2zyM6+iUFKaOfL9h15QBKOk=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-1ERKMENPMTn5CPK4d5uTZ18ONMrCEY2PIK1GqSGHnSg=";
npmDeps = fetchNpmDeps {
name = "${pname}-npm-deps-${version}";
inherit src;
hash = "sha256-jSgBrMPDmC98bcG44s0npA0Gu0mG8/qbJ3X3wNIHSY8=";
};
nativeBuildInputs = [
cargo-tauri.hook
nodejs
npmHooks.npmConfigHook
pkg-config
wrapGAppsHook4
copyDesktopItems
jq
moreutils
];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isLinux [
glib-networking
webkitgtk_4_1
];
cargoRoot = "src-tauri";
buildAndTestSubdir = cargoRoot;
postPatch = ''
jq \
'.bundle.createUpdaterArtifacts = false' \
src-tauri/tauri.conf.json \
| sponge src-tauri/tauri.conf.json
'';
meta = {
homepage = "https://github.com/CrazySpottedDove/fiz";
changelog = "https://github.com/CrazySpottedDove/fiz/releases/tag/app-v${version}";
description = "Third-party app for Learning in ZJU";
mainProgram = "fiz";
license = lib.licenses.mit;
};
}

View file

@ -0,0 +1,34 @@
{
lib,
stdenv,
unzip,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "MapleMono-Variable";
version = "7.3";
src = fetchurl {
url = "https://github.com/subframe7536/Maple-font/releases/download/v${version}/${pname}.zip";
sha256 = "1wfgfginnrqk2ppiyxb6jbvflha9kx0yqj84mbw04c923mav56z0";
};
# Work around the "unpacker appears to have produced no directories"
# case that happens when the archive doesn't have a subdirectory.
sourceRoot = ".";
nativeBuildInputs = [ unzip ];
installPhase = ''
find . -name '*.ttf' -exec install -Dt $out/share/fonts/truetype {} \;
find . -name '*.otf' -exec install -Dt $out/share/fonts/opentype {} \;
find . -name '*.woff2' -exec install -Dt $out/share/fonts/woff2 {} \;
'';
meta = with lib; {
homepage = "https://github.com/subframe7536/Maple-font";
description = ''
Open source Nerd Font CN unhinted font with round corner and ligatures for IDE and command line
'';
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ oluceps ];
};
}