summary refs log tree commit diff
path: root/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2021-03-16 17:25:26 +0200
committeradisbladis <adisbladis@gmail.com>2021-03-16 17:25:26 +0200
commit215b49c082ca48e90eaf733b63868aac744a0548 (patch)
tree557b08621ee00cef226ff27ab0579ced25fa99fb /pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix
parent985de1a4ece7b7b3b1a9dc8c493a99dd6145b072 (diff)
downloadnixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar.gz
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar.bz2
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar.lz
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar.xz
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.tar.zst
nixpkgs-215b49c082ca48e90eaf733b63868aac744a0548.zip
poetry2nix: 1.16.0 -> 1.16.1
Diffstat (limited to 'pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix')
-rw-r--r--pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix84
1 files changed, 76 insertions, 8 deletions
diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix
index 2106708a28f..88783e4f380 100644
--- a/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix
+++ b/pkgs/development/tools/poetry2nix/poetry2nix/overrides.nix
@@ -250,6 +250,15 @@ self: super:
     }
   );
 
+  fiona = super.fiona.overridePythonAttrs (
+    old: {
+      buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.gdal_2 ];
+      nativeBuildInputs = [
+        pkgs.gdal_2 # for gdal-config
+      ];
+    }
+  );
+
   gdal = super.gdal.overridePythonAttrs (
     old: {
       preBuild = (old.preBuild or "") + ''
@@ -266,6 +275,23 @@ self: super:
     }
   );
 
+  grpcio = super.grpcio.overridePythonAttrs (old: {
+    nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.cython pkgs.pkg-config ];
+    buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.c-ares pkgs.openssl pkgs.zlib ];
+
+    outputs = [ "out" "dev" ];
+
+    GRPC_BUILD_WITH_BORING_SSL_ASM = "";
+    GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
+    GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
+    GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
+    DISABLE_LIBC_COMPATIBILITY = 1;
+  });
+
+  grpcio-tools = super.grpcio-tools.overridePythonAttrs (old: {
+    outputs = [ "out" "dev" ];
+  });
+
   h3 = super.h3.overridePythonAttrs (
     old: {
       preBuild = (old.preBuild or "") + ''
@@ -277,14 +303,34 @@ self: super:
 
   h5py = super.h5py.overridePythonAttrs (
     old:
-    if old.format != "wheel" then rec {
-      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
-      buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.hdf5 self.pkgconfig self.cython ];
-      configure_flags = "--hdf5=${pkgs.hdf5}";
-      postConfigure = ''
-        ${self.python.executable} setup.py configure ${configure_flags}
-      '';
-    } else old
+    if old.format != "wheel" then
+      (
+        let
+          mpi = pkgs.hdf5.mpi;
+          mpiSupport = pkgs.hdf5.mpiSupport;
+        in
+        {
+          nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
+          buildInputs =
+            (old.buildInputs or [ ])
+            ++ [ pkgs.hdf5 self.pkgconfig self.cython ]
+            ++ lib.optional mpiSupport mpi
+          ;
+          propagatedBuildInputs =
+            old.propagatedBuildInputs
+            ++ lib.optionals mpiSupport [ self.mpi4py self.openssh ]
+          ;
+          preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
+          HDF5_DIR = "${pkgs.hdf5}";
+          HDF5_MPI = if mpiSupport then "ON" else "OFF";
+          # avoid strict pinning of numpy
+          postPatch = ''
+            substituteInPlace setup.py \
+              --replace "numpy ==" "numpy >="
+          '';
+          pythonImportsCheck = [ "h5py" ];
+        }
+      ) else old
   );
 
   horovod = super.horovod.overridePythonAttrs (
@@ -618,6 +664,12 @@ self: super:
     }
   );
 
+  munch = super.munch.overridePythonAttrs (
+    old: {
+      buildInputs = (old.buildInputs or [ ]) ++ [ self.pbr ];
+    }
+  );
+
   mysqlclient = super.mysqlclient.overridePythonAttrs (
     old: {
       buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.libmysqlclient ];
@@ -939,6 +991,13 @@ self: super:
     }
   );
 
+  pygeos = super.pygeos.overridePythonAttrs (
+    old: {
+      buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.geos ];
+      nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.geos ];
+    }
+  );
+
   pygobject = super.pygobject.overridePythonAttrs (
     old: {
       nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.pkg-config ];
@@ -1226,6 +1285,15 @@ self: super:
     propagatedBuildInputs = (old.propagatedBuildInputs or [ ]) ++ [ self.setuptools ];
   });
 
+  rtree = super.rtree.overridePythonAttrs (old: {
+    propagatedNativeBuildInputs = (old.propagatedNativeBuildInputs or [ ]) ++ [ pkgs.libspatialindex ];
+    postPatch = ''
+      substituteInPlace rtree/finder.py --replace \
+        "find_library('spatialindex_c')" \
+        "'${pkgs.libspatialindex}/lib/libspatialindex_c${pkgs.stdenv.hostPlatform.extensions.sharedLibrary}'"
+    '';
+  });
+
   scipy = super.scipy.overridePythonAttrs (
     old:
     if old.format != "wheel" then {