nur-packages

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

commit d9590e392d9ce3a7a023c0de94f736645a32411f
parent b2dc0209d7f5f08e7a8376bd76f8a44558decd68
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Thu, 28 Sep 2023 22:23:12 +0400

Add routeconverter

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/gpx/routeconverter/default.nix | 45+++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -275,6 +275,7 @@ lib.makeScope newScope ( gpxlib = callPackage ./gpx/gpxlib { }; gpxtools = callPackage ./gpx/gpxtools { }; gpxtrackposter = callPackage ./gpx/gpxtrackposter { }; + routeconverter = callPackage ./gpx/routeconverter { jre = pkgs.jdk11; }; trackanimation = callPackage ./gpx/trackanimation { }; ### IMAGES diff --git a/pkgs/gpx/routeconverter/default.nix b/pkgs/gpx/routeconverter/default.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchurl, jre, makeWrapper }: + +stdenv.mkDerivation (finalAttrs: { + pname = "routeconverter"; + version = "2.33"; + + srcs = [ + (fetchurl { + url = "https://static.routeconverter.com/download/previous-releases/${finalAttrs.version}/RouteConverterLinuxOpenSource.jar"; + hash = "sha256-GDvrn5YfLej+v5vJ9bRP2M4g6bESpl43rFsR39mRpRI="; + }) + (fetchurl { + url = "https://static.routeconverter.com/download/previous-releases/${finalAttrs.version}/RouteConverterCmdLine.jar"; + hash = "sha256-pTA8/1zDwYMB02tkKGDTiTdyhVJwIl3sTkdiUAEwWZs="; + }) + ]; + + nativeBuildInputs = [ makeWrapper ]; + + buildInputs = [ jre ]; + + dontUnpack = true; + + installPhase = '' + install -dm755 $out/bin + for _src in $srcs; do + install -Dm644 "$_src" $out/share/java/$(stripHash "$_src") + done + + makeWrapper ${jre}/bin/java $out/bin/routeconverter \ + --add-flags "-jar $out/share/java/RouteConverterLinuxOpenSource.jar" + + makeWrapper ${jre}/bin/java $out/bin/routeconverter-cli \ + --add-flags "-jar $out/share/java/RouteConverterCmdLine.jar" + ''; + + meta = with lib; { + description = "A free tool to edit and convert routes, tracks and waypoints"; + homepage = "https://www.routeconverter.com/"; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + license = licenses.gpl2Plus; + maintainers = [ maintainers.sikmir ]; + platforms = jre.meta.platforms; + }; +})