diff options
Diffstat (limited to 'pkgs/tools/system/kanata')
-rw-r--r-- | pkgs/tools/system/kanata/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/tools/system/kanata/default.nix b/pkgs/tools/system/kanata/default.nix index 706382d3dd04e..eab7fb3d4b17c 100644 --- a/pkgs/tools/system/kanata/default.nix +++ b/pkgs/tools/system/kanata/default.nix @@ -1,4 +1,6 @@ -{ lib +{ stdenv +, lib +, darwin , rustPlatform , fetchFromGitHub , withCmd ? false @@ -17,8 +19,15 @@ rustPlatform.buildRustPackage rec { 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 ''; @@ -27,8 +36,8 @@ rustPlatform.buildRustPackage rec { 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.linux; + maintainers = with maintainers; [ bmanuel linj ]; + platforms = platforms.unix; mainProgram = "kanata"; }; } |