Merge pull request #312654 from eliandoran/darwin/framework/iokit

treewide: fix darwin build errors due to missing `IOKit` framework
This commit is contained in:
Weijia Wang 2024-05-19 00:47:32 +02:00 committed by GitHub
commit 16fb539e7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -1,6 +1,8 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, darwin
}:
rustPlatform.buildRustPackage rec {
@ -14,6 +16,10 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-kVO2WMwB/Lv4fCcdXaWL/Gfmenky6uMNVrUwhWU9y7A=";
};
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
IOKit
]);
cargoHash = "sha256-Pa8YgFAT9nue/QLhHQm6PlTJU/myK60UcND5TthMOxc=";
RUSTFLAGS = "--cfg tokio_unstable";
@ -30,5 +36,7 @@ rustPlatform.buildRustPackage rec {
license = with licenses; [ mit ];
mainProgram = "rcp";
maintainers = with maintainers; [ wykurz ];
# = note: Undefined symbols for architecture x86_64: "_utimensat"
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}

View File

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, cython
, fetchFromGitHub
@ -8,6 +9,7 @@
, setuptools
, unittestCheckHook
, wheel
, darwin
}:
buildPythonPackage rec {
@ -33,7 +35,9 @@ buildPythonPackage rec {
buildInputs = [
libstatgrab
];
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
IOKit
]);
nativeCheckInputs = [
unittestCheckHook

View File

@ -1,8 +1,10 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
...
}:
rustPlatform.buildRustPackage rec {
@ -16,6 +18,10 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-BwKLl8eMCrqVt9PA5SHAXxu3ypP2ePcSuljKL+wSkvw=";
};
buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
IOKit
]);
cargoSha256 = "sha256-16Z20opeZpoa7h258um+grL3ktPmY4P0M/tqMTr5hYc=";
meta = with lib; {