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}";