1{ lib, buildPythonPackage, fetchFromGitHub, cmake, python 2, libosmium, protozero, boost, expat, bzip2, zlib, pybind11 3, shapely, pythonOlder, isPyPy, lz4, requests, pytestCheckHook 4}: 5 6buildPythonPackage rec { 7 pname = "pyosmium"; 8 version = "3.5.0"; 9 10 disabled = pythonOlder "3.4" || isPyPy; 11 12 src = fetchFromGitHub { 13 owner = "osmcode"; 14 repo = pname; 15 rev = "refs/tags/v${version}"; 16 sha256 = "sha256-dumTyca1nLPa6B3p5fmUGWa6jReHOeFPc9heTz/2zao="; 17 }; 18 19 nativeBuildInputs = [ cmake ]; 20 buildInputs = [ libosmium protozero boost expat bzip2 zlib pybind11 lz4 ]; 21 propagatedBuildInputs = [ requests ]; 22 23 preBuild = "cd .."; 24 25 checkInputs = [ 26 pytestCheckHook 27 shapely 28 ]; 29 30 meta = with lib; { 31 description = "Python bindings for libosmium"; 32 homepage = "https://osmcode.org/pyosmium"; 33 changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md"; 34 license = licenses.bsd2; 35 maintainers = with maintainers; [ sikmir ]; 36 }; 37}