at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cmake, 6 libosmium, 7 protozero, 8 boost, 9 expat, 10 bzip2, 11 zlib, 12 pybind11, 13 pythonOlder, 14 pytest-httpserver, 15 pytestCheckHook, 16 setuptools, 17 shapely, 18 werkzeug, 19 isPyPy, 20 lz4, 21 requests, 22}: 23 24buildPythonPackage rec { 25 pname = "pyosmium"; 26 version = "4.0.2"; 27 pyproject = true; 28 29 disabled = pythonOlder "3.7" || isPyPy; 30 31 src = fetchFromGitHub { 32 owner = "osmcode"; 33 repo = "pyosmium"; 34 tag = "v${version}"; 35 hash = "sha256-pW2w/M4P4DtGhnTy72w0wjMtpLtSgvYGaemme/rRrwM="; 36 }; 37 38 build-system = [ setuptools ]; 39 40 nativeBuildInputs = [ cmake ]; 41 42 buildInputs = [ 43 libosmium 44 protozero 45 boost 46 expat 47 bzip2 48 zlib 49 pybind11 50 lz4 51 ]; 52 53 dependencies = [ requests ]; 54 55 preBuild = "cd .."; 56 57 nativeCheckInputs = [ 58 pytestCheckHook 59 shapely 60 werkzeug 61 pytest-httpserver 62 ]; 63 64 __darwinAllowLocalNetworking = true; 65 66 meta = { 67 description = "Python bindings for libosmium"; 68 homepage = "https://osmcode.org/pyosmium"; 69 changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md"; 70 license = lib.licenses.bsd2; 71 maintainers = with lib.maintainers; [ sikmir ]; 72 }; 73}