1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 folium,
6 gdal,
7 geopandas,
8 hatchling,
9 matplotlib,
10 networkx,
11 numpy,
12 pandas,
13 pythonOlder,
14 rasterio,
15 requests,
16 rtree,
17 scikit-learn,
18 scipy,
19 shapely,
20}:
21
22buildPythonPackage rec {
23 pname = "osmnx";
24 version = "2.0.0";
25 pyproject = true;
26
27 disabled = pythonOlder "3.9";
28
29 src = fetchFromGitHub {
30 owner = "gboeing";
31 repo = "osmnx";
32 tag = "v${version}";
33 hash = "sha256-5IvohqEYYvFqAKOYreEsEKjzfJaqShYck2xCSQXXfyQ=";
34 };
35
36 build-system = [ hatchling ];
37
38 dependencies = [
39 geopandas
40 matplotlib
41 networkx
42 numpy
43 pandas
44 requests
45 rtree
46 shapely
47 folium
48 scikit-learn
49 scipy
50 gdal
51 rasterio
52 ];
53
54 # Tests require network
55 doCheck = false;
56
57 pythonImportsCheck = [ "osmnx" ];
58
59 meta = {
60 description = "Package to easily download, construct, project, visualize, and analyze complex street networks from OpenStreetMap with NetworkX";
61 homepage = "https://github.com/gboeing/osmnx";
62 changelog = "https://github.com/gboeing/osmnx/blob/${src.rev}/CHANGELOG.md";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ psyanticy ];
65 teams = [ lib.teams.geospatial ];
66 };
67}