From 1fac09ca92a55fbd16d4163ed7ebef2b0e2fea40 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:27:36 +0100 Subject: [PATCH 1/5] bazel_5: use new apple sdk pattern --- .../tools/build-managers/bazel/bazel_5/default.nix | 10 ---------- pkgs/top-level/all-packages.nix | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix index f33c716b1e820..5fd35f3cb9143 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix @@ -30,9 +30,6 @@ cctools, libcxx, sigtool, - CoreFoundation, - CoreServices, - Foundation, # Allow to independently override the jdks used to build and run respectively buildJdk, runJdk, @@ -455,10 +452,6 @@ stdenv.mkDerivation rec { # Explicitly configure gcov since we don't have it on Darwin, so autodetection fails export GCOV=${coreutils}/bin/false - # Framework search paths aren't added by bintools hook - # https://github.com/NixOS/nixpkgs/pull/41914 - export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" - # libcxx includes aren't added by libcxx hook # https://github.com/NixOS/nixpkgs/pull/41589 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1" @@ -633,9 +626,6 @@ stdenv.mkDerivation rec { ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx - CoreFoundation - CoreServices - Foundation ]; # Bazel makes extensive use of symlinks in the WORKSPACE. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58f4ab07d90a0..04f8516c21a5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7724,10 +7724,9 @@ with pkgs; bazel_5 = callPackage ../development/tools/build-managers/bazel/bazel_5 { inherit (darwin) sigtool; - inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; - stdenv = if stdenv.cc.isClang then llvmPackages.stdenv + stdenv = if stdenv.cc.isClang then llvmPackages_17.stdenv else if stdenv.cc.isGNU then gcc12Stdenv else stdenv; bazel_self = bazel_5; From 2e4aa2b7ab0589191a250c2ce8127dc9070226fd Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:27:54 +0100 Subject: [PATCH 2/5] bazel_6: use new apple sdk pattern --- .../tools/build-managers/bazel/bazel_6/default.nix | 8 ++------ pkgs/top-level/all-packages.nix | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix index b1069673f14a2..7d339dec2c96e 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix @@ -8,7 +8,7 @@ # updater , python3, writeScript # Apple dependencies -, cctools, libcxx, CoreFoundation, CoreServices, Foundation, sigtool +, cctools, libcxx, sigtool # Allow to independently override the jdks used to build and run respectively , buildJdk, runJdk , runtimeShell @@ -415,10 +415,6 @@ stdenv.mkDerivation rec { # Explicitly configure gcov since we don't have it on Darwin, so autodetection fails export GCOV=${coreutils}/bin/false - # Framework search paths aren't added by bintools hook - # https://github.com/NixOS/nixpkgs/pull/41914 - export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks" - # libcxx includes aren't added by libcxx hook # https://github.com/NixOS/nixpkgs/pull/41589 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1" @@ -583,7 +579,7 @@ stdenv.mkDerivation rec { which zip python3.pkgs.absl-py # Needed to build fish completion - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx sigtool CoreFoundation CoreServices Foundation ]; + ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx sigtool ]; # Bazel makes extensive use of symlinks in the WORKSPACE. # This causes problems with infinite symlinks if the build output is in the same location as the diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04f8516c21a5a..52fa36ad692da 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7732,13 +7732,11 @@ with pkgs; bazel_self = bazel_5; }; - bazel_6 = darwin.apple_sdk_11_0.callPackage ../development/tools/build-managers/bazel/bazel_6 { + bazel_6 = callPackage ../development/tools/build-managers/bazel/bazel_6 { inherit (darwin) sigtool; - inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation; buildJdk = jdk11_headless; runJdk = jdk11_headless; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv - else if stdenv.cc.isClang then llvmPackages.stdenv + stdenv = if stdenv.cc.isClang then llvmPackages_17.stdenv else if stdenv.cc.isGNU then gcc12Stdenv else stdenv; bazel_self = bazel_6; From 79660b4ef4ea65837a01af0ea6f14a3f622a7c15 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:28:01 +0100 Subject: [PATCH 3/5] bazel_7: use new apple sdk pattern --- .../tools/build-managers/bazel/bazel_7/default.nix | 11 ----------- pkgs/top-level/all-packages.nix | 6 ++---- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index a37b28c88c178..cd9acfcfc723e 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -37,10 +37,6 @@ libcxx, libtool, sigtool, - CoreFoundation, - CoreServices, - Foundation, - IOKit, # Allow to independently override the jdks used to build and run respectively buildJdk, runJdk, @@ -410,10 +406,6 @@ stdenv.mkDerivation rec { # Explicitly configure gcov since we don't have it on Darwin, so autodetection fails export GCOV=${coreutils}/bin/false - # Framework search paths aren't added by bintools hook - # https://github.com/NixOS/nixpkgs/pull/41914 - export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks -F${IOKit}/Library/Frameworks" - # libcxx includes aren't added by libcxx hook # https://github.com/NixOS/nixpkgs/pull/41589 export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1" @@ -564,9 +556,6 @@ stdenv.mkDerivation rec { ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ cctools libcxx - Foundation - CoreFoundation - CoreServices ]; # Bazel makes extensive use of symlinks in the WORKSPACE. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 52fa36ad692da..ebca858d55144 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7742,13 +7742,11 @@ with pkgs; bazel_self = bazel_6; }; - bazel_7 = darwin.apple_sdk_11_0.callPackage ../development/tools/build-managers/bazel/bazel_7 { + bazel_7 = callPackage ../development/tools/build-managers/bazel/bazel_7 { inherit (darwin) sigtool; - inherit (darwin.apple_sdk_11_0.frameworks) CoreFoundation CoreServices Foundation IOKit; buildJdk = jdk21_headless; runJdk = jdk21_headless; - stdenv = if stdenv.hostPlatform.isDarwin then darwin.apple_sdk_11_0.stdenv - else if stdenv.cc.isClang then llvmPackages.stdenv + stdenv = if stdenv.cc.isClang then llvmPackages_17.stdenv else stdenv; bazel_self = bazel_7; }; From 325c094e12a59172fecf499d530e92df09614f08 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:57:54 +0100 Subject: [PATCH 4/5] python312Packages.keras: disable float64 test on darwin --- pkgs/development/python-modules/keras/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index f35ff2252362c..87f241d3b2ab2 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -92,6 +92,8 @@ buildPythonPackage rec { "test_min_max_norm" ] ++ lib.optionals stdenv.isDarwin [ + # TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead. + "test_dynamic_backend_torch" # AttributeError: module 'numpy' has no attribute 'float128'. Did you mean: 'float16'? "test_spectrogram_error" ]; From ff65ee04a617bda9c062abdfc0176aa5b9330d5a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Fri, 3 Jan 2025 21:27:54 +0100 Subject: [PATCH 5/5] python312Packages.jaxopt: disable more flaky test on darwin --- pkgs/development/python-modules/jaxopt/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/jaxopt/default.nix b/pkgs/development/python-modules/jaxopt/default.nix index b617e21c1c277..ca4eb06034a07 100644 --- a/pkgs/development/python-modules/jaxopt/default.nix +++ b/pkgs/development/python-modules/jaxopt/default.nix @@ -94,6 +94,7 @@ buildPythonPackage rec { # AssertionError (flaky numerical tests) "test_logreg_with_intercept_manual_loop3" "test_binary_logit_log_likelihood" + "test_inv_hessian_product_pytree3" ]; meta = {