commit c7a60d1794e8b10f344ebe3a3be67b36afc649ab
parent 2e563ab3045851c034855fe42ec946e2011f0cdf
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Mon, 31 Aug 2020 13:46:33 +0300
Add gpxtrackposter
Diffstat:
3 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -302,6 +302,20 @@
"url": "https://notabug.org/irdvo/gpxtools/archive/919fb5953af8de1e71f61244eb70dd56b670a429.tar.gz",
"url_template": "https://notabug.org/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "gpxtrackposter": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-08-21T10:20:21Z",
+ "description": "Create a visually appealing poster from your GPX tracks",
+ "homepage": "https://github.com/flopp/GpxTrackPoster",
+ "owner": "flopp",
+ "repo": "GpxTrackPoster",
+ "rev": "b1611ce45da8162e112ee75ca788214f891e2ea4",
+ "sha256": "0vxdvay0yz85bak835159zjrhmic1f9iy38r1f8nnss10ryvz0z7",
+ "type": "tarball",
+ "url": "https://github.com/flopp/GpxTrackPoster/archive/b1611ce45da8162e112ee75ca788214f891e2ea4.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"gt-bash-client": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -130,6 +130,7 @@ lib.makeScope newScope (
inherit sources;
};
gpxtools = callPackage ./tools/geo/gpxtools { };
+ gpxtrackposter = callPackage ./tools/geo/gpxtrackposter { };
gt-bash-client = callPackage ./tools/dict/gt-bash-client { };
gt4gd = callPackage ./tools/dict/gt4gd { };
i18n-editor = callPackage ./tools/i18n-editor { jre = pkgs.jdk11; };
diff --git a/pkgs/tools/geo/gpxtrackposter/default.nix b/pkgs/tools/geo/gpxtrackposter/default.nix
@@ -0,0 +1,26 @@
+{ lib, python3Packages, s2sphere, sources }:
+let
+ pname = "gpxtrackposter";
+ date = lib.substring 0 10 sources.gpxtrackposter.date;
+ version = "unstable-" + date;
+in
+python3Packages.buildPythonApplication {
+ inherit pname version;
+ src = sources.gpxtrackposter;
+
+ postPatch = ''
+ substituteInPlace gpxtrackposter/poster.py \
+ --replace "ATHLETE" ""
+ '';
+
+ propagatedBuildInputs = with python3Packages; [ appdirs gpxpy svgwrite colour s2sphere ];
+
+ checkInputs = with python3Packages; [ pytestCheckHook ];
+
+ meta = with lib; {
+ inherit (sources.gpxtrackposter) description homepage;
+ license = licenses.mit;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}