Merge pull request #281437 from bmanuel/kanata_darwin

kanata: add support for darwin platforms
This commit is contained in:
Stanisław Pitucha 2024-01-19 22:45:59 +11:00 committed by GitHub
commit a23739720f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -2553,6 +2553,12 @@
githubId = 52386117;
name = "Blusk";
};
bmanuel = {
name = "Benjamin Manuel";
email = "ben@benmanuel.com";
github = "bmanuel";
githubId = 3662307;
};
bmilanov = {
name = "Biser Milanov";
email = "bmilanov11+nixpkgs@gmail.com";

View File

@ -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";
};
}