From cc1866eacb1a19b1d57f4737123721e797c9d9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cillian=20de=20R=C3=B3iste?= Date: Tue, 2 Sep 2014 00:25:18 +0200 Subject: [PATCH] processing: apply patch from IRC to make it work without the IDE too --- .../graphics/processing/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/graphics/processing/default.nix b/pkgs/applications/graphics/processing/default.nix index 7d0595134e99..ecce0e260bb2 100644 --- a/pkgs/applications/graphics/processing/default.nix +++ b/pkgs/applications/graphics/processing/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm }: +{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm, which }: stdenv.mkDerivation rec { name = "processing-${version}"; @@ -12,20 +12,21 @@ stdenv.mkDerivation rec { # Stop it trying to download its own version of java patches = [ ./use-nixpkgs-jre.patch ]; - buildInputs = [ ant jre makeWrapper libXxf86vm ]; + buildInputs = [ ant jre makeWrapper libXxf86vm which ]; buildPhase = "cd build && ant build"; installPhase = '' + mkdir -p $out/${name} mkdir -p $out/bin - cp -r linux/work/* $out/ - sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing - sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing-java - mv $out/processing{,-java} $out/bin/ - wrapProgram $out/bin/processing --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib - wrapProgram $out/bin/processing-java --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib - mkdir $out/java - ln -s ${jre}/bin $out/java/ + cp -r linux/work/* $out/${name}/ + makeWrapper $out/${name}/processing $out/bin/processing \ + --prefix PATH : "${jre}/bin:${which}/bin" \ + --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib + makeWrapper $out/${name}/processing-java $out/bin/processing-java \ + --prefix PATH : "${jre}/bin:${which}/bin" \ + --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib + ln -s ${jre} $out/${name}/java ''; meta = with stdenv.lib; {