nixpkgs/pkgs/tools/system/kanata/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

43 lines
1.1 KiB
Nix

{ stdenv
, lib
, darwin
, rustPlatform
, fetchFromGitHub
, withCmd ? false
}:
rustPlatform.buildRustPackage rec {
pname = "kanata";
version = "1.6.1";
src = fetchFromGitHub {
owner = "jtroo";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Kuxy6lGzImYYujuJwZZdfuu3X7/PJNOJefeZ0hVJaAA=";
};
cargoHash =
if stdenv.isLinux
then "sha256-R2lHg+I8Sry3/n8vTfPpDysKCKMDUvxyMKRhEQKDqS0="
else "sha256-9CXrOP6SI+sCD9Q94N8TlRB/h+F/l7t3zHbtVDqddS4=";
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
buildFeatures = lib.optional withCmd "cmd";
postInstall = ''
install -Dm 444 assets/kanata-icon.svg $out/share/icons/hicolor/scalable/apps/kanata.svg
'';
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; [ bmanuel linj ];
platforms = platforms.unix;
mainProgram = "kanata";
broken = stdenv.isDarwin;
};
}