nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit a2fef22e6c789e559f8c4ea813c43cbdc36119b7
parent 8d01793f4728139f78c8bea5855c2afefd199174
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri,  8 Oct 2021 21:17:35 +0300

Add osm-python-tools

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/osm/osm-python-tools/default.nix | 45+++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -305,6 +305,7 @@ lib.makeScope newScope ( map-stylizer = callPackage ./osm/map-stylizer { }; maperitive-bin = callPackage ./osm/maperitive/bin.nix { }; osm-area-tools = callPackage ./osm/osm-area-tools { }; + osm-python-tools = callPackage ./osm/osm-python-tools { }; osmcoastline = callPackage ./osm/osmcoastline { }; overpass-api = callPackage ./osm/overpass-api { }; osmwalkthrough = callPackage ./osm/osmwalkthrough { }; diff --git a/pkgs/osm/osm-python-tools/default.nix b/pkgs/osm/osm-python-tools/default.nix @@ -0,0 +1,45 @@ +{ lib, python3Packages, fetchFromGitHub }: + +python3Packages.buildPythonPackage rec { + pname = "osm-python-tools"; + version = "2021-09-16"; + + src = fetchFromGitHub { + owner = "mocnik-science"; + repo = pname; + rev = "4ae053f65c1639bb8f0fe961c94594d31eada952"; + hash = "sha256-3Eru0pXJtKDBs3mSpW+Z+r8d2XLmuMRTEhA4IMPrPpQ="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest" "#'pytest" \ + ''; + + propagatedBuildInputs = with python3Packages; [ + beautifulsoup4 + geojson + lxml + matplotlib + numpy + pandas + ujson + xarray + ]; + + doCheck = false; + + pythonImportsCheck = [ + "OSMPythonTools.api" + "OSMPythonTools.data" + "OSMPythonTools.nominatim" + "OSMPythonTools.overpass" + ]; + + meta = with lib; { + description = "A library to access OpenStreetMap related services"; + inherit (src.meta) homepage; + license = licenses.gpl3; + maintainers = [ maintainers.sikmir ]; + }; +}