nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ fetchurl, lib, stdenv, makeDesktopItem, makeWrapper, unzip, jre, copyDesktopItems }:
2
3stdenv.mkDerivation rec {
4 pname = "gpsprune";
5 version = "22.2";
6
7 src = fetchurl {
8 url = "https://activityworkshop.net/software/gpsprune/gpsprune_${version}.jar";
9 sha256 = "sha256-7T7UmS650VvYN29vQxemzsaxF5wPFF+yCNCTyXY7nmY=";
10 };
11
12 dontUnpack = true;
13
14 nativeBuildInputs = [ makeWrapper copyDesktopItems ];
15 buildInputs = [ jre ];
16
17 desktopItems = [
18 (makeDesktopItem {
19 name = "gpsprune";
20 exec = "gpsprune";
21 icon = "gpsprune";
22 desktopName = "GpsPrune";
23 genericName = "GPS Data Editor";
24 comment = meta.description;
25 categories = [ "Education" "Geoscience" ];
26 })
27 ];
28
29 installPhase = ''
30 runHook preInstall
31
32 install -Dm644 ${src} $out/share/java/gpsprune.jar
33 makeWrapper ${jre}/bin/java $out/bin/gpsprune \
34 --add-flags "-jar $out/share/java/gpsprune.jar"
35 mkdir -p $out/share/pixmaps
36 ${unzip}/bin/unzip -p $src tim/prune/gui/images/window_icon_64.png > $out/share/pixmaps/gpsprune.png
37
38 runHook postInstall
39 '';
40
41 meta = with lib; {
42 description = "Application for viewing, editing and converting GPS coordinate data";
43 homepage = "https://activityworkshop.net/software/gpsprune/";
44 sourceProvenance = with sourceTypes; [ binaryBytecode ];
45 license = licenses.gpl2Plus;
46 maintainers = with maintainers; [ rycee ];
47 platforms = platforms.all;
48 };
49}