Skip to content

Commit 9e23d79

Browse files
committed
kanata: fix darwin build
1 parent d9b69c3 commit 9e23d79

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

pkgs/by-name/ka/kanata/package.nix

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
stdenv,
33
lib,
4-
darwin,
4+
apple-sdk_13,
5+
darwinMinVersionHook,
56
rustPlatform,
67
fetchFromGitHub,
7-
jq,
8-
moreutils,
98
versionCheckHook,
109
nix-update-script,
10+
writeShellScriptBin,
1111
withCmd ? false,
1212
}:
13-
1413
rustPlatform.buildRustPackage rec {
1514
pname = "kanata";
1615
version = "1.8.0";
@@ -25,7 +24,16 @@ rustPlatform.buildRustPackage rec {
2524
useFetchCargoVendor = true;
2625
cargoHash = "sha256-/r4u7pM7asCvG3LkbuP1Y63WVls1uZtV/L3cSOzUXr4=";
2726

28-
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];
27+
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
28+
apple-sdk_13
29+
(darwinMinVersionHook "13.0")
30+
];
31+
32+
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
33+
(writeShellScriptBin "sw_vers" ''
34+
echo 'ProductVersion: 13.0'
35+
'')
36+
];
2937

3038
buildFeatures = lib.optional withCmd "cmd";
3139

@@ -52,6 +60,5 @@ rustPlatform.buildRustPackage rec {
5260
];
5361
platforms = platforms.unix;
5462
mainProgram = "kanata";
55-
broken = stdenv.hostPlatform.isDarwin;
5663
};
5764
}

0 commit comments

Comments
 (0)