kanata: 1.9.0 -> 1.10.0 (#461152)

This commit is contained in:
LIN, Jian
2025-12-02 12:44:47 +00:00
committed by GitHub
3 changed files with 13 additions and 9 deletions
+3
View File
@@ -11,6 +11,9 @@
- `spoof` has been removed, as there are many issues upstream with it working on modern OS versions, and it appears to be unmaintained.
- `kanata` now requires `karabiner-dk` version 6.0+ or later.
The package has been updated to use the new `karabiner-dk` package and the `darwinDriver` output stays at the version defined in the package.
- All Log4Shell vulnerability scanners were removed, as they were all unmaintained upstream and are no longer relevant given that the vulnerability has been fixed upstream for several years.
- `python3packages.pillow-avif-plugin` has been removed as the functionality is included in `python3packages.pillow` directly since version 11.3.
+6 -6
View File
@@ -6,7 +6,7 @@
karabiner-dk,
fetchFromGitHub,
versionCheckHook,
common-updater-scripts,
nix-update,
yq,
curl,
jq,
@@ -16,16 +16,16 @@
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "kanata";
version = "1.9.0";
version = "1.10.0";
src = fetchFromGitHub {
owner = "jtroo";
repo = "kanata";
rev = "v${finalAttrs.version}";
sha256 = "sha256-xxAIwiwCQugDXpWga9bQ9ZGfem46rwDlmf64dX/tw7g=";
sha256 = "sha256-IicVuJZBHzBv9SNGQuWIIaLq2qpWfn/jMFh9KPvAThs=";
};
cargoHash = "sha256-LfjuQHR3vVUr2e0efVymnfCnyYkFRx7ZiNdSIjBZc5s=";
cargoHash = "sha256-2DTL1u17jUFiRoVe7973L5/352GtKte/vakk01SSRwY=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
(writeShellScriptBin "sw_vers" ''
@@ -45,7 +45,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
];
passthru = {
darwinDriverVersion = "5.0.0"; # needs to be updated if karabiner-driverkit changes
darwinDriverVersion = "6.2.0"; # needs to be updated if karabiner-driverkit changes
updateScript = lib.getExe (writeShellApplication {
name = "update-script-kanata";
runtimeInputs = [
@@ -53,7 +53,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
gnused
yq
jq
common-updater-scripts
nix-update
];
text = builtins.readFile ./update.sh;
});
+4 -3
View File
@@ -1,8 +1,9 @@
NEW_VERSION="$(curl --silent https://api.github.com/repos/jtroo/kanata/releases/latest ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} | jq '.tag_name | ltrimstr("v")' --raw-output)"
update-source-version "kanata" "$NEW_VERSION" --ignore-same-version
nix-update
importTree="(let tree = import ./.; in if builtins.isFunction tree then tree {} else tree)"
NEW_VERSION=$(nix-instantiate --eval -E "with $importTree; kanata.version" | tr -d '"')
karabinerDriverCrateVersion="$(curl -L "https://raw.githubusercontent.com/jtroo/kanata/refs/tags/v$NEW_VERSION/Cargo.lock" | tomlq | jq --raw-output '.package[] | select(.name | test("karabiner-driverkit")) |.version')"
newKarabinerDkVersion="$(curl -L "https://crates.io/api/v1/crates/karabiner-driverkit/$karabinerDriverCrateVersion/download" | tar xzvf - --strip-components=1 -O "karabiner-driverkit-$karabinerDriverCrateVersion/c_src/Karabiner-DriverKit-VirtualHIDDevice/version.json" | jq --raw-output0 .package_version)"
importTree="(let tree = import ./.; in if builtins.isFunction tree then tree {} else tree)"
oldDarwinVersion=$(nix-instantiate --eval -E "with $importTree; kanata.passthru.darwinDriverVersion" | tr -d '"')
nixFile=$(nix-instantiate --eval --strict -A "kanata.meta.position" | sed -re 's/^"(.*):[0-9]+"$/\1/')
sed -i "$nixFile" -re "s|\"$oldDarwinVersion\"|\"$newKarabinerDkVersion\"|"