mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 07:26:54 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
34 lines
823 B
Nix
34 lines
823 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, python
|
|
, nose2
|
|
, proj ? null
|
|
}:
|
|
|
|
buildPythonPackage (rec {
|
|
pname = "pyproj";
|
|
version = "1.9.5.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8";
|
|
};
|
|
|
|
buildInputs = [ nose2 ];
|
|
|
|
checkPhase = ''
|
|
runHook preCheck
|
|
pushd unittest # changing directory should ensure we're importing the global pyproj
|
|
${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])"
|
|
popd
|
|
runHook postCheck
|
|
'';
|
|
|
|
meta = {
|
|
description = "Python interface to PROJ.4 library";
|
|
homepage = https://github.com/jswhit/pyproj;
|
|
license = with lib.licenses; [ isc ];
|
|
};
|
|
} // (if proj == null then {} else { PROJ_DIR = proj; }))
|