2020-04-24 23:36:52 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, cmake, python
|
|
|
|
, libosmium, protozero, boost, expat, bzip2, zlib, pybind11
|
2022-08-12 12:06:08 +00:00
|
|
|
, shapely, pythonOlder, isPyPy, lz4, requests, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyosmium";
|
2022-09-11 15:47:08 +00:00
|
|
|
version = "3.4.1";
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4" || isPyPy;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "osmcode";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-11 15:47:08 +00:00
|
|
|
sha256 = "sha256-PMQnQe699ZWRR2gevrSCTokyc9xr1TL9Ohuqn7NL8c8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ libosmium protozero boost expat bzip2 zlib pybind11 lz4 ];
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = "cd ..";
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
shapely
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for libosmium";
|
|
|
|
homepage = "https://osmcode.org/pyosmium";
|
2021-04-05 15:23:46 +00:00
|
|
|
changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
};
|
|
|
|
}
|