kanata: add support for darwin platforms
This commit is contained in:
parent
0060077558
commit
006000061a
@ -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
|
||||
'';
|
||||
@ -28,7 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||
homepage = "https://github.com/jtroo/kanata";
|
||||
license = licenses.lgpl3Only;
|
||||
maintainers = with maintainers; [ linj ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
mainProgram = "kanata";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user