gpsbabel: remove use of phases

Also make use of `makeWrapper`.
This commit is contained in:
Robert Helgesson 2018-05-17 19:12:17 +02:00
parent d7ac3818d3
commit 838bfaa8ed
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -1,4 +1,4 @@
{ fetchurl, stdenv, makeDesktopItem, unzip, bash, jre8 }:
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, bash, jre8 }:
stdenv.mkDerivation rec {
name = "gpsprune-${version}";
@ -9,8 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "0n08fg55zgpfg1f6lq0n3ngi0n8af1r0rhmbnpik5mjng4m9g3x5";
};
phases = [ "installPhase" ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre8 ];
desktopItem = makeDesktopItem {
@ -23,15 +22,11 @@ stdenv.mkDerivation rec {
categories = "Education;Geoscience;";
};
installPhase = ''
buildCommand = ''
mkdir -p $out/bin $out/share/java
cp -v $src $out/share/java/gpsprune.jar
cat > $out/bin/gpsprune <<EOF
#!${bash}/bin/bash
exec ${jre8}/bin/java -jar $out/share/java/gpsprune.jar "\$@"
EOF
chmod 755 $out/bin/gpsprune
makeWrapper ${jre8}/bin/java $out/bin/gpsprune \
--add-flags "-jar $out/share/java/gpsprune.jar"
mkdir -p $out/share/applications
cp $desktopItem/share/applications"/"* $out/share/applications
mkdir -p $out/share/pixmaps