nur-packages

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

default.nix (1438B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchurl,
      5   jre,
      6   makeWrapper,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "routeconverter";
     11   version = "3.1";
     12 
     13   srcs = [
     14     (fetchurl {
     15       url = "https://static.routeconverter.com/download/previous-releases/${finalAttrs.version}/RouteConverterLinuxOpenSource.jar";
     16       hash = "sha256-noGM3Vwv8O7EWMnqhkctA7gyB+So5pZyzfatjt0KN54=";
     17     })
     18     (fetchurl {
     19       url = "https://static.routeconverter.com/download/previous-releases/${finalAttrs.version}/RouteConverterCmdLine.jar";
     20       hash = "sha256-EMnSeeklQyQkWBJFZmHm58RbPJTrhQx2qtO0rXTa4HA=";
     21     })
     22   ];
     23 
     24   nativeBuildInputs = [ makeWrapper ];
     25 
     26   buildInputs = [ jre ];
     27 
     28   dontUnpack = true;
     29 
     30   installPhase = ''
     31     install -dm755 $out/bin
     32     for _src in $srcs; do
     33       install -Dm644 "$_src" $out/share/java/$(stripHash "$_src")
     34     done
     35 
     36     makeWrapper ${jre}/bin/java $out/bin/routeconverter \
     37       --add-flags "-jar $out/share/java/RouteConverterLinuxOpenSource.jar"
     38 
     39     makeWrapper ${jre}/bin/java $out/bin/routeconverter-cli \
     40       --add-flags "-jar $out/share/java/RouteConverterCmdLine.jar"
     41   '';
     42 
     43   meta = {
     44     description = "A free tool to edit and convert routes, tracks and waypoints";
     45     homepage = "https://www.routeconverter.com/";
     46     sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
     47     license = lib.licenses.gpl2Plus;
     48     maintainers = [ lib.maintainers.sikmir ];
     49     platforms = jre.meta.platforms;
     50   };
     51 })