1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-18 17:23:25 -04:00
nixpkgs/pkgs/tools/system/kanata/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, darwin
, rustPlatform
2023-07-25 12:12:44 -04:00
, fetchFromGitHub
, withCmd ? false
}:
rustPlatform.buildRustPackage rec {
pname = "kanata";
2023-12-22 14:34:54 -05:00
version = "1.5.0";
src = fetchFromGitHub {
owner = "jtroo";
repo = pname;
rev = "v${version}";
2023-12-22 14:34:54 -05:00
sha256 = "sha256-ci/0Ksmi0uNHIvpZlihWvGeNabzmk+k3fUeuMDVpFeE=";
};
2023-12-22 14:34:54 -05:00
cargoHash = "sha256-IzgVF6SHJjOB48VehQ5taD5iWQXFKLcVBWTEl3ArkGQ=";
buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
buildFeatures = lib.optional withCmd "cmd";
# Workaround for https://github.com/nixos/nixpkgs/issues/166205
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}";
};
postInstall = ''
install -Dm 444 assets/kanata-icon.svg $out/share/icons/hicolor/scalable/apps/kanata.svg
'';
meta = with lib; {
2022-08-20 21:06:28 -04:00
description = "A 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";
};
}