commit e4a720de416d46fc3e1c29875a2da5f5911888f0
parent 149297ea58d2f6567aa51ae12b3fe384ffe17252
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Thu, 2 Jun 2022 15:08:33 +0300
Add pyrosm
Diffstat:
2 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -356,6 +356,7 @@ lib.makeScope newScope (
phyghtmap = callPackage ./osm/phyghtmap { };
polytiles = callPackage ./osm/polytiles { };
pyrobuf = callPackage ./osm/pyrobuf { };
+ pyrosm = callPackage ./osm/pyrosm { };
sdlmap = callPackage ./osm/sdlmap { };
smopy = callPackage ./osm/smopy { };
smrender = callPackage ./osm/smrender {
diff --git a/pkgs/osm/pyrosm/default.nix b/pkgs/osm/pyrosm/default.nix
@@ -0,0 +1,36 @@
+{ lib, python3Packages, fetchFromGitHub, cykhash, pyrobuf }:
+
+python3Packages.buildPythonPackage rec {
+ pname = "pyrosm";
+ version = "0.6.1";
+
+ src = fetchFromGitHub {
+ owner = "HTenkanen";
+ repo = pname;
+ rev = "v${version}";
+ hash = "sha256-/VS8TWSn/UACtRIRX9iaA39ikIzL1pzgNzZntPFYNmw=";
+ };
+
+ nativeBuildInputs = with python3Packages; [ cython ];
+
+ propagatedBuildInputs = with python3Packages; [
+ python-rapidjson
+ geopandas
+ pygeos
+ cykhash
+ pyrobuf
+ ];
+
+ doCheck = false;
+
+ checkInputs = with python3Packages; [ pytestCheckHook ];
+
+ pythonImportsCheck = [ "pyrosm" ];
+
+ meta = with lib; {
+ description = "A Python tool to parse OSM data from Protobuf format into GeoDataFrame";
+ inherit (src.meta) homepage;
+ license = licenses.mit;
+ maintainers = [ maintainers.sikmir ];
+ };
+}