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