nur-packages

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

commit 5d6940bdd3433ea5d5fbb84294c597fd60b36f1f
parent cc66918ac79a986d892068def4552105cb8a6874
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Thu, 28 Jan 2021 03:45:36 +0300

Add gpx_interpolate

Diffstat:
Mnix/sources.json | 14++++++++++++++
Mpkgs/default.nix | 1+
Apkgs/tools/geo/gpx-interpolate/default.nix | 27+++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/nix/sources.json b/nix/sources.json @@ -331,6 +331,20 @@ "url": "https://github.com/flopp/go-staticmaps/archive/4aa39a44ead69856a813688e09389ddac059de29.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "gpx-interpolate": { + "branch": "master", + "builtin": false, + "date": "2021-01-24T21:39:05Z", + "description": "Python script to interpolate GPX files using linear or spline interpolation", + "homepage": "https://github.com/remisalmon/gpx_interpolate", + "owner": "remisalmon", + "repo": "gpx_interpolate", + "rev": "24236e45e3d8baa0662c329b735b79a17e84c1bd", + "sha256": "0gi8xq7gsmi1a6gbp4d0a0h6ys2jpf0b1fys3ggph5gqf47h9pvc", + "type": "tarball", + "url": "https://github.com/remisalmon/gpx_interpolate/archive/24236e45e3d8baa0662c329b735b79a17e84c1bd.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "gpx-layer": { "branch": "master", "builtin": false, diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -144,6 +144,7 @@ lib.makeScope newScope ( }; fx-bin = callPackage ./tools/text/fx/bin.nix { }; go-staticmaps = callPackage ./tools/geo/go-staticmaps { }; + gpx-interpolate = callPackage ./tools/geo/gpx-interpolate { }; gpx-layer = perlPackages.callPackage ./tools/geo/gpx-layer { inherit sources; }; diff --git a/pkgs/tools/geo/gpx-interpolate/default.nix b/pkgs/tools/geo/gpx-interpolate/default.nix @@ -0,0 +1,27 @@ +{ lib, python3Packages, sources }: + +python3Packages.buildPythonApplication { + pname = "gpx_interpolate"; + version = lib.substring 0 10 sources.gpx-interpolate.date; + + src = sources.gpx-interpolate; + + propagatedBuildInputs = with python3Packages; [ gpxpy scipy numpy ]; + + dontUseSetuptoolsBuild = true; + + checkPhase = '' + ${python3Packages.python.interpreter} -m doctest -o IGNORE_EXCEPTION_DETAIL -f test/test.txt + ''; + + installPhase = '' + install -Dm755 gpx_interpolate.py $out/bin/gpx_interpolate + ''; + + meta = with lib; { + inherit (sources.gpx-interpolate) description homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +}