From 5a1a9a662b207835d5364b21393f73c70e169155 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 May 2024 15:58:38 +0300 Subject: [PATCH 1/4] nufmt: fix build on darwin --- pkgs/development/tools/nufmt/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/nufmt/default.nix b/pkgs/development/tools/nufmt/default.nix index e753c134d1ab..a73e300052fc 100644 --- a/pkgs/development/tools/nufmt/default.nix +++ b/pkgs/development/tools/nufmt/default.nix @@ -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; { From 499418387cd19f3279c054a96ef636b7399f278e Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 May 2024 15:59:10 +0300 Subject: [PATCH 2/4] python3Packages.pystatgrab: fix build on darwin --- pkgs/development/python-modules/pystatgrab/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pystatgrab/default.nix b/pkgs/development/python-modules/pystatgrab/default.nix index 9ba3fb7b3785..574cc349d5de 100644 --- a/pkgs/development/python-modules/pystatgrab/default.nix +++ b/pkgs/development/python-modules/pystatgrab/default.nix @@ -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 From 8f153fdae698b667da5e8d2938866760e3d4d758 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 May 2024 16:00:41 +0300 Subject: [PATCH 3/4] rcp: add missing framework on darwin --- pkgs/by-name/rc/rcp/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/rc/rcp/package.nix b/pkgs/by-name/rc/rcp/package.nix index b5b64741ac0a..fa44bf9b670c 100644 --- a/pkgs/by-name/rc/rcp/package.nix +++ b/pkgs/by-name/rc/rcp/package.nix @@ -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"; From c08e006d36b34a59de4a7bd80eeb76fd6fa86b20 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 18 May 2024 16:01:00 +0300 Subject: [PATCH 4/4] rcp: mark as broken on darwin-x86_64 --- pkgs/by-name/rc/rcp/package.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/by-name/rc/rcp/package.nix b/pkgs/by-name/rc/rcp/package.nix index fa44bf9b670c..f04fa7e769eb 100644 --- a/pkgs/by-name/rc/rcp/package.nix +++ b/pkgs/by-name/rc/rcp/package.nix @@ -36,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; }; }