3
0
Fork 0
forked from mirrors/nixpkgs

processing: apply patch from IRC to make it work without the IDE too

This commit is contained in:
Cillian de Róiste 2014-09-02 00:25:18 +02:00
parent 416b20fbd5
commit cc1866eacb

View file

@ -1,4 +1,4 @@
{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm }: { fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm, which }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "processing-${version}"; name = "processing-${version}";
@ -12,20 +12,21 @@ stdenv.mkDerivation rec {
# Stop it trying to download its own version of java # Stop it trying to download its own version of java
patches = [ ./use-nixpkgs-jre.patch ]; patches = [ ./use-nixpkgs-jre.patch ];
buildInputs = [ ant jre makeWrapper libXxf86vm ]; buildInputs = [ ant jre makeWrapper libXxf86vm which ];
buildPhase = "cd build && ant build"; buildPhase = "cd build && ant build";
installPhase = '' installPhase = ''
mkdir -p $out/${name}
mkdir -p $out/bin mkdir -p $out/bin
cp -r linux/work/* $out/ cp -r linux/work/* $out/${name}/
sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing makeWrapper $out/${name}/processing $out/bin/processing \
sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing-java --prefix PATH : "${jre}/bin:${which}/bin" \
mv $out/processing{,-java} $out/bin/ --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
wrapProgram $out/bin/processing --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib makeWrapper $out/${name}/processing-java $out/bin/processing-java \
wrapProgram $out/bin/processing-java --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib --prefix PATH : "${jre}/bin:${which}/bin" \
mkdir $out/java --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
ln -s ${jre}/bin $out/java/ ln -s ${jre} $out/${name}/java
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {