commit bdd94856a2f98be2a6afc437a4989e39541e8f4d
parent 5c69c2cfdd299451c495b309b5c9838d3c008801
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 3 Aug 2020 03:26:43 +0300
Add garmin-uploader
Diffstat:
3 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -330,6 +330,20 @@
"url": "https://github.com/xinebf/google-translate-for-goldendict/archive/31a1628136302f6fbedf9468f1dae3521a174731.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "gupload": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2019-12-19T08:44:39Z",
+ "description": "Garmin Connect Python Uploader",
+ "homepage": "https://github.com/La0/garmin-uploader",
+ "owner": "La0",
+ "repo": "garmin-uploader",
+ "rev": "f8c48a8e100530c5c7ad871bdb0a8cf96eeb8034",
+ "sha256": "105xfqgbjn87pg0fxqg50cl4r7m0hhmi6niknvgaxai531g3w4wd",
+ "type": "tarball",
+ "url": "https://github.com/La0/garmin-uploader/archive/f8c48a8e100530c5c7ad871bdb0a8cf96eeb8034.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"hfst": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -121,6 +121,7 @@ lib.makeScope newScope (
click = click-6-7;
};
fx-bin = callPackage ./tools/text/fx/bin.nix { };
+ garmin-uploader = callPackage ./tools/misc/garmin-uploader { };
gimgtools = callPackage ./tools/geo/gimgtools { };
gmaptool = callPackage ./tools/geo/gmaptool { };
gpx-layer = perlPackages.callPackage ./tools/geo/gpx-layer {
diff --git a/pkgs/tools/misc/garmin-uploader/default.nix b/pkgs/tools/misc/garmin-uploader/default.nix
@@ -0,0 +1,21 @@
+{ lib, python3Packages, mercantile, pymbtiles, sources }:
+let
+ pname = "garmin-uploader";
+ date = lib.substring 0 10 sources.gupload.date;
+ version = "unstable-" + date;
+in
+python3Packages.buildPythonApplication {
+ inherit pname version;
+ src = sources.gupload;
+
+ propagatedBuildInputs = with python3Packages; [ requests ];
+
+ checkInputs = with python3Packages; [ pytestCheckHook ];
+
+ meta = with lib; {
+ inherit (sources.gupload) description homepage;
+ license = licenses.gpl2;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}