mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
755b915a15
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/'
43 lines
1.1 KiB
Nix
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;
|
|
};
|
|
}
|