kanata: 1.11.0 -> 1.12.0 (#539186)
This commit is contained in:
@@ -16,16 +16,16 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "kanata";
|
||||
version = "1.11.0";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jtroo";
|
||||
repo = "kanata";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-7rGV0nfI/ntvByz3NQs/2Sa2q/Ml8O3XRD14Mbt5fIU=";
|
||||
hash = "sha256-WjdmjgEMoo3QNqT4yWxaKOkfuRLdNg4Im+V1Hy5vWgY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-Qxa90fMZ3c1+jlyxbIkC94DtSQSKFNr2V8GiLII6PNc=";
|
||||
cargoHash = "sha256-4UBN4I35ZPPPL68LxxPna9Fs9sATCiwoTbWgHYwqOjs=";
|
||||
|
||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
(writeShellScriptBin "sw_vers" ''
|
||||
@@ -39,6 +39,11 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
install -Dm 444 assets/kanata-icon.svg $out/share/icons/hicolor/scalable/apps/kanata.svg
|
||||
'';
|
||||
|
||||
checkFlags = [
|
||||
# these try to access /dev/uinput and won't work in the build sandbox
|
||||
"--skip=kanata::tcp_layer_change_tests"
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
|
||||
@@ -3,7 +3,7 @@ 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)"
|
||||
newKarabinerDkVersion="$(curl -L "https://static.crates.io/crates/karabiner-driverkit/karabiner-driverkit-$karabinerDriverCrateVersion.crate" | tar xzvf - --strip-components=1 -O "karabiner-driverkit-$karabinerDriverCrateVersion/c_src/Karabiner-DriverKit-VirtualHIDDevice/version.json" | jq --raw-output0 .package_version)"
|
||||
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\"|"
|
||||
|
||||
Reference in New Issue
Block a user