alloy: use installPhase instead of ./builder.sh
Also pass on any arguments from the shell wrapper to the .jar. And be less clever with shell strings.
This commit is contained in:
parent
8c39547fc2
commit
e50afd12b7
@ -1,16 +0,0 @@
|
|||||||
source $stdenv/setup
|
|
||||||
|
|
||||||
jar=${src##*/}
|
|
||||||
jar=$out/share/alloy/${jar#*-}
|
|
||||||
|
|
||||||
install -Dm644 $src $jar
|
|
||||||
|
|
||||||
cat << EOF > alloy
|
|
||||||
#! $SHELL
|
|
||||||
exec $jre/bin/java -jar $jar
|
|
||||||
EOF
|
|
||||||
|
|
||||||
install -Dm755 alloy $out/bin/alloy
|
|
||||||
|
|
||||||
install -Dm644 $icon $out/share/pixmaps/alloy.png
|
|
||||||
cp -r ${desktopItem}/share/applications $out/share
|
|
@ -38,11 +38,24 @@ stdenv.mkDerivation rec {
|
|||||||
categories = "Development;IDE;Education;";
|
categories = "Development;IDE;Education;";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
buildInputs = [ jre ];
|
buildInputs = [ jre ];
|
||||||
inherit jre;
|
|
||||||
|
|
||||||
icon = ./icon.png;
|
phases = [ "installPhase" ];
|
||||||
|
|
||||||
builder = ./builder.sh;
|
installPhase = ''
|
||||||
|
jar=`basename ${src}`
|
||||||
|
jar=$out/share/alloy/alloy${version}.jar
|
||||||
|
|
||||||
|
install -Dm644 ${src} $jar
|
||||||
|
|
||||||
|
cat << EOF > alloy
|
||||||
|
#!${stdenv.shell}
|
||||||
|
exec ${jre}/bin/java -jar $jar "\''${@}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
install -Dm755 alloy $out/bin/alloy
|
||||||
|
|
||||||
|
install -Dm644 ${./icon.png} $out/share/pixmaps/alloy.png
|
||||||
|
cp -r ${desktopItem}/share/applications $out/share
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user