1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2026-01-26 19:56:29 +01:00

chore: update

This commit is contained in:
Ryan Cao 2025-10-19 11:02:48 +01:00
parent 6c6f264768
commit 789ef320b0
Signed by: ryanccn
GPG key ID: F605AB4AF937D5D0
10 changed files with 40 additions and 84 deletions

View file

@ -8,7 +8,6 @@
{
packages = {
helix-with-lsps = pkgs.callPackage ./helix-with-lsps.nix { };
ibm-plex-compat = pkgs.callPackage ./ibm-plex-compat.nix { };
ryan-mono-bin = pkgs.callPackage ./ryan-mono-bin.nix { };
};
};

View file

@ -1,46 +0,0 @@
# SPDX-FileCopyrightText: 2025 Ryan Cao <hello@ryanccn.dev>
#
# SPDX-License-Identifier: Apache-2.0
{
ibm-plex,
python313Packages,
families ? [ ],
}:
(ibm-plex.override { inherit families; }).overrideAttrs (_: {
pname = "ibm-plex-compat";
postInstall = ''
set -eo pipefail
PATH="${python313Packages.fonttools}/bin:$PATH"
cd "$out/share/fonts/opentype"
ansi_green="\033[32m"
ansi_reset="\033[0m"
for medium_font in $(find . -type f -name '*.otf' -and -name '*Medium*'); do
echo -e "''${ansi_green}Patching''${ansi_reset} $medium_font (Medm -> Medium)"
ttx_path="''${medium_font%.*}.ttx"
ttx "$medium_font"
substituteInPlace "$ttx_path" --replace-fail 'Medm' 'Medium'
ttx -f "$ttx_path"
rm "$ttx_path"
done
for semibold_font in $(find . -type f -name '*.otf' -and -name '*SemiBold*'); do
echo -e "''${ansi_green}Patching''${ansi_reset} $semibold_font (SmBld -> Semibold)"
ttx_path="''${semibold_font%.*}.ttx"
ttx "$semibold_font"
substituteInPlace "$ttx_path" --replace-fail 'SmBld' 'Semibold'
ttx -f "$ttx_path"
rm "$ttx_path"
done
echo -e "''${ansi_green}Done!''${ansi_reset}"
'';
})