nur-packages

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

default.nix (946B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchurl,
      5   jre,
      6   makeWrapper,
      7 }:
      8 
      9 stdenv.mkDerivation (finalAttrs: {
     10   pname = "gpx-animator";
     11   version = "1.8.2";
     12 
     13   src = fetchurl {
     14     url = "https://download.gpx-animator.app/gpx-animator-${finalAttrs.version}-all.jar";
     15     hash = "sha256-pIiKRD7vDrr+J0Up7YZ6uNZGopOArK+rA0KPRf1OWIU=";
     16   };
     17 
     18   nativeBuildInputs = [ makeWrapper ];
     19 
     20   buildInputs = [ jre ];
     21 
     22   dontUnpack = true;
     23 
     24   installPhase = ''
     25     install -dm755 $out/bin
     26     install -Dm644 $src $out/share/java/${finalAttrs.src.name}
     27 
     28     makeWrapper ${jre}/bin/java $out/bin/gpx-animator \
     29       --add-flags "-jar $out/share/java/gpx-animator-${finalAttrs.version}-all.jar"
     30   '';
     31 
     32   meta = {
     33     description = "GPX Animator";
     34     homepage = "https://gpx-animator.app/";
     35     sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
     36     license = lib.licenses.asl20;
     37     maintainers = [ lib.maintainers.sikmir ];
     38     platforms = jre.meta.platforms;
     39   };
     40 })