2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
2022-08-12 12:06:08 +00:00
|
|
|
, rustPlatform
|
2023-08-04 22:07:22 +00:00
|
|
|
, fetchFromGitHub
|
2022-08-12 12:06:08 +00:00
|
|
|
, withCmd ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "kanata";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.4.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jtroo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
sha256 = "sha256-Tenh2LARajYAFHJ5gddeozY7rfySSvqFhudc/7b9cGg=";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
cargoHash = "sha256-oJVGZhKJVK8q5lgK+G+KhVupOF05u37B7Nmv4rrI28I=";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
buildFeatures = lib.optional withCmd "cmd";
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm 444 assets/kanata-icon.svg $out/share/icons/hicolor/scalable/apps/kanata.svg
|
|
|
|
'';
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
meta = with lib; {
|
2022-09-09 14:08:57 +00:00
|
|
|
description = "A tool to improve keyboard comfort and usability with advanced customization";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://github.com/jtroo/kanata";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ linj ];
|
|
|
|
platforms = platforms.linux;
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "kanata";
|
2022-08-12 12:06:08 +00:00
|
|
|
};
|
|
|
|
}
|