commit 7951f34e6761d9303a5da3ab7acf74e39a87cef3
parent 294355e4e7eeabe944d2e7f06b5d3b836e1805cc
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Thu, 19 Dec 2019 03:23:58 +0300
Add gpxpy
Diffstat:
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/default.nix b/default.nix
@@ -7,6 +7,7 @@ let
in
{
datamaps = callPackage ./pkgs/datamaps { inherit (sources) datamaps; };
- mbutil = python3Packages.callPackage ./pkgs/mbutil { inherit (sources) mbutil; };
gpx-layer = perlPackages.callPackage ./pkgs/gpx-layer { inherit (sources) gpx-layer; };
+ gpxpy = python3Packages.callPackage ./pkgs/gpxpy { inherit (sources) gpxpy; };
+ mbutil = python3Packages.callPackage ./pkgs/mbutil { inherit (sources) mbutil; };
}
diff --git a/nix/sources.json b/nix/sources.json
@@ -23,6 +23,18 @@
"url": "https://github.com/ericfischer/gpx-layer/archive/746b4723cf1f69fb86d45cf2d4efeaae9e711d2d.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "gpxpy": {
+ "branch": "master",
+ "description": "gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.",
+ "homepage": "",
+ "owner": "tkrajina",
+ "repo": "gpxpy",
+ "rev": "5e81b930c81cb88f3534e6f48d970c367de302b7",
+ "sha256": "0ps468n0xhk69c7c8j612xmhml7pysv2d78241vkdyy3gr771576",
+ "type": "tarball",
+ "url": "https://github.com/tkrajina/gpxpy/archive/5e81b930c81cb88f3534e6f48d970c367de302b7.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"mbutil": {
"branch": "master",
"description": "Importer and Exporter of MBTiles",
diff --git a/pkgs/gpxpy/default.nix b/pkgs/gpxpy/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildPythonApplication, python, lxml, gpxpy }:
+
+buildPythonApplication rec {
+ pname = "gpxpy";
+ version = lib.substring 0 7 src.rev;
+ src = gpxpy;
+
+ propagatedBuildInputs = [ lxml ];
+
+ checkPhase = ''
+ ${python.interpreter} -m unittest test
+ '';
+
+ meta = with lib; {
+ description = gpxpy.description;
+ homepage = "https://github.com/tkrajina/gpxpy";
+ license = licenses.asl20;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ sikmir ];
+ };
+}