From cb5bf262cdebd1ae4acd6f717f6436e99b002853 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Fri, 22 Jun 2018 12:30:59 +0200 Subject: [PATCH] python.pkgs.netcdf4: fix build --- .../python-modules/netcdf4/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/netcdf4/default.nix b/pkgs/development/python-modules/netcdf4/default.nix index 93d79c4e626..0baa323d53c 100644 --- a/pkgs/development/python-modules/netcdf4/default.nix +++ b/pkgs/development/python-modules/netcdf4/default.nix @@ -1,23 +1,25 @@ -{ stdenv, buildPythonPackage, fetchurl, isPyPy -, numpy, zlib, netcdf, hdf5, curl, libjpeg, cython +{ stdenv, buildPythonPackage, fetchPypi, isPyPy, pytest +, numpy, zlib, netcdf, hdf5, curl, libjpeg, cython, cftime }: buildPythonPackage rec { pname = "netCDF4"; - name = "${pname}-${version}"; version = "1.4.0"; disabled = isPyPy; - src = fetchurl { - url = "mirror://pypi/n/netCDF4/${name}.tar.gz"; + src = fetchPypi { + inherit pname version; sha256 = "a6c0b46f410f101c09d60b8cc460aafec06732f0130c6cb2730717bcc605b388"; }; + checkInputs = [ pytest ]; + buildInputs = [ cython ]; propagatedBuildInputs = [ + cftime numpy zlib netcdf @@ -26,6 +28,13 @@ buildPythonPackage rec { libjpeg ]; + checkPhase = '' + py.test test/tst_*.py + ''; + + # Tests need fixing. + doCheck = false; + # Variables used to configure the build process USE_NCCONFIG="0"; HDF5_DIR="${hdf5}";