1{ stdenv, buildPythonPackage, fetchPypi, isPyPy, pytest 2, numpy, zlib, netcdf, hdf5, curl, libjpeg, cython, cftime 3}: 4buildPythonPackage rec { 5 pname = "netCDF4"; 6 version = "1.4.1"; 7 8 disabled = isPyPy; 9 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "d4fc65b98e348c39d082ab6b4b7f6d636b1b4e63bec016e5bca189fee5d46403"; 13 }; 14 15 checkInputs = [ pytest ]; 16 17 buildInputs = [ 18 cython 19 ]; 20 21 propagatedBuildInputs = [ 22 cftime 23 numpy 24 zlib 25 netcdf 26 hdf5 27 curl 28 libjpeg 29 ]; 30 31 checkPhase = '' 32 py.test test/tst_*.py 33 ''; 34 35 # Tests need fixing. 36 doCheck = false; 37 38 # Variables used to configure the build process 39 USE_NCCONFIG="0"; 40 HDF5_DIR="${hdf5}"; 41 NETCDF4_DIR="${netcdf}"; 42 CURL_DIR="${curl.dev}"; 43 JPEG_DIR="${libjpeg.dev}"; 44 45 meta = with stdenv.lib; { 46 description = "Interface to netCDF library (versions 3 and 4)"; 47 homepage = https://pypi.python.org/pypi/netCDF4; 48 license = licenses.free; # Mix of license (all MIT* like) 49 }; 50}