1{ lib 2, buildPythonPackage 3, fetchPypi 4, python 5, nose2 6, proj ? null 7}: 8 9buildPythonPackage (rec { 10 pname = "pyproj"; 11 version = "1.9.5.1"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8"; 16 }; 17 18 buildInputs = [ nose2 ]; 19 20 checkPhase = '' 21 runHook preCheck 22 pushd unittest # changing directory should ensure we're importing the global pyproj 23 ${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])" 24 popd 25 runHook postCheck 26 ''; 27 28 meta = { 29 description = "Python interface to PROJ.4 library"; 30 homepage = https://github.com/jswhit/pyproj; 31 license = with lib.licenses; [ isc ]; 32 }; 33} // (if proj == null then {} else { PROJ_DIR = proj; }))