about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/netcdf4/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/netcdf4/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/netcdf4/default.nix17
1 files changed, 11 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/netcdf4/default.nix b/nixpkgs/pkgs/development/python-modules/netcdf4/default.nix
index 9f00a33fdf6b..f181a7d4c4fe 100644
--- a/nixpkgs/pkgs/development/python-modules/netcdf4/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/netcdf4/default.nix
@@ -1,4 +1,5 @@
 { lib
+, stdenv
 , buildPythonPackage
 , fetchPypi
 , isPyPy
@@ -50,12 +51,16 @@ buildPythonPackage rec {
     NO_NET=1 NO_CDL=1 ${python.interpreter} run_all.py
   '';
 
-  # Variables used to configure the build process
-  USE_NCCONFIG = "0";
-  HDF5_DIR = lib.getDev hdf5;
-  NETCDF4_DIR = netcdf;
-  CURL_DIR = curl.dev;
-  JPEG_DIR = libjpeg.dev;
+  env = {
+    # Variables used to configure the build process
+    USE_NCCONFIG = "0";
+    HDF5_DIR = lib.getDev hdf5;
+    NETCDF4_DIR = netcdf;
+    CURL_DIR = curl.dev;
+    JPEG_DIR = libjpeg.dev;
+  } // lib.optionalAttrs stdenv.cc.isClang {
+    NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
+  };
 
   pythonImportsCheck = [ "netCDF4" ];