Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
61 lines
1.4 KiB
Nix
61 lines
1.4 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
apple-sdk_13,
|
|
darwinMinVersionHook,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
versionCheckHook,
|
|
nix-update-script,
|
|
writeShellScriptBin,
|
|
withCmd ? false,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "kanata";
|
|
version = "1.9.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jtroo";
|
|
repo = "kanata";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-xxAIwiwCQugDXpWga9bQ9ZGfem46rwDlmf64dX/tw7g=";
|
|
};
|
|
|
|
cargoHash = "sha256-LfjuQHR3vVUr2e0efVymnfCnyYkFRx7ZiNdSIjBZc5s=";
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
apple-sdk_13
|
|
(darwinMinVersionHook "13.0")
|
|
];
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
(writeShellScriptBin "sw_vers" ''
|
|
echo 'ProductVersion: 13.0'
|
|
'')
|
|
];
|
|
|
|
buildFeatures = lib.optional withCmd "cmd";
|
|
|
|
postInstall = ''
|
|
install -Dm 444 assets/kanata-icon.svg $out/share/icons/hicolor/scalable/apps/kanata.svg
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tool to improve keyboard comfort and usability with advanced customization";
|
|
homepage = "https://github.com/jtroo/kanata";
|
|
license = licenses.lgpl3Only;
|
|
maintainers = with maintainers; [ linj ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "kanata";
|
|
};
|
|
}
|