summary refs log tree commit diff
path: root/pkgs/development/python-modules/osmnx/default.nix
blob: c34b75bd04157298fd39d83ba06822a5666378a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ stdenv, buildPythonPackage, fetchFromGitHub, geopandas, descartes, matplotlib, networkx, numpy
, pandas, requests, Rtree, shapely, pytest, coverage, coveralls, folium, scikitlearn, scipy}:

buildPythonPackage rec {
  pname = "osmnx";
  version = "0.8.1";

  src = fetchFromGitHub {
    owner  = "gboeing";
    repo   = pname;
    rev    = "v${version}";
    sha256 = "1pn2v3dhbmb0yhqif9padg7x3sdx27pgfr95i3kxj4v0yrviaf9k";
  };

  propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikitlearn scipy ];

  checkInputs = [ coverage pytest coveralls ];
  #Fails when using sandboxing as it requires internet connection, works fine without it
  doCheck = false;

  #Check phase for the record
  #checkPhase = ''
  #  coverage run --source osmnx -m pytest --verbose
  #'';

  meta = with stdenv.lib; {
    description = "A package to easily download, construct, project, visualize, and analyze complex street networks from OpenStreetMap with NetworkX.";
    homepage = https://github.com/gboeing/osmnx;
    license = licenses.mit;
    maintainers = with maintainers; [ psyanticy ];
  };
}