From 000bbe4f502476a0fabab3416f27ef1a96d16abd Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:46:59 -0500 Subject: [PATCH] chore: add more darwin overrides --- nix/overlay.nix | 7 +++ nix/pyproject-overrides.nix | 98 ++++++++++++++++++------------------- 2 files changed, 56 insertions(+), 49 deletions(-) diff --git a/nix/overlay.nix b/nix/overlay.nix index b92c038948e16..c20a24b761769 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -53,6 +53,13 @@ let # Use base package set from pyproject.nix builders (pkgs.callPackage pyproject-nix.build.packages { inherit python; + stdenv = pkgs.stdenv.override ( + lib.optionalAttrs pkgs.stdenv.targetPlatform.isDarwin { + targetPlatform = pkgs.stdenv.targetPlatform // { + darwinSdkVersion = "12.0"; + }; + } + ); }).overrideScope (lib.composeManyExtensions ([ pyproject-build-systems.overlays.default diff --git a/nix/pyproject-overrides.nix b/nix/pyproject-overrides.nix index d313df6addda7..b2cd54681a64f 100644 --- a/nix/pyproject-overrides.nix +++ b/nix/pyproject-overrides.nix @@ -53,55 +53,55 @@ in ]; }); - scipy = prev.scipy.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ - final.meson-python - final.pyproject-metadata - final.cython - final.packaging - final.numpy - final.pybind11 - final.pythran - pkgs.pkg-config - pkgs.ninja - pkgs.meson - pkgs.gfortran - pkgs.cmake - ]; - }); - - scikit-learn = prev.scikit-learn.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ - final.meson-python - final.pyproject-metadata - final.cython - final.packaging - final.numpy - final.scipy - pkgs.ninja - pkgs.meson - pkgs.gfortran - ]; - }); - - pyproj = prev.pyproj.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ - final.setuptools - final.cython - pkgs.proj - ]; - PROJ_DIR = "${lib.getBin pkgs.proj}"; - PROJ_INCDIR = "${lib.getDev pkgs.proj}"; - }); - - pyogrio = prev.pyogrio.overrideAttrs (attrs: { - nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ - final.setuptools - final.versioneer - final.cython - pkgs.gdal - ]; - }); + # scipy = prev.scipy.overrideAttrs (attrs: { + # nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ + # final.meson-python + # final.pyproject-metadata + # final.cython + # final.packaging + # final.numpy + # final.pybind11 + # final.pythran + # pkgs.pkg-config + # pkgs.ninja + # pkgs.meson + # pkgs.gfortran + # pkgs.cmake + # ]; + # }); + # + # scikit-learn = prev.scikit-learn.overrideAttrs (attrs: { + # nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ + # final.meson-python + # final.pyproject-metadata + # final.cython + # final.packaging + # final.numpy + # final.scipy + # pkgs.ninja + # pkgs.meson + # pkgs.gfortran + # ]; + # }); + # + # pyproj = prev.pyproj.overrideAttrs (attrs: { + # nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ + # final.setuptools + # final.cython + # pkgs.proj + # ]; + # PROJ_DIR = "${lib.getBin pkgs.proj}"; + # PROJ_INCDIR = "${lib.getDev pkgs.proj}"; + # }); + # + # pyogrio = prev.pyogrio.overrideAttrs (attrs: { + # nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ + # final.setuptools + # final.versioneer + # final.cython + # pkgs.gdal + # ]; + # }); }) // lib.mapAttrs (name: spec: addBuildSystems prev.${name} spec) buildSystemOverrides // { mysqlclient = prev.mysqlclient.overrideAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs or [ ] ++ [ final.setuptools ];