2014-08-25 21:43:14 +00:00
|
|
|
{ fetchurl, stdenv, ant, jre, makeWrapper, libXxf86vm }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "processing-${version}";
|
|
|
|
version = "2.2.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/processing/processing/archive/processing-0227-${version}.tar.gz";
|
|
|
|
sha256 = "1r8q5y0h4gpqap5jwkspc0li6566hzx5chr7hwrdn8mxlzsm50xk";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Stop it trying to download its own version of java
|
|
|
|
patches = [ ./use-nixpkgs-jre.patch ];
|
|
|
|
|
|
|
|
buildInputs = [ ant jre makeWrapper libXxf86vm ];
|
|
|
|
|
|
|
|
buildPhase = "cd build && ant build";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -r linux/work/* $out/
|
|
|
|
sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing
|
2014-08-31 20:45:37 +00:00
|
|
|
sed -e "s#APPDIR=\`dirname \"\$APPDIR\"\`#APPDIR=$out#" -i $out/processing-java
|
|
|
|
mv $out/processing{,-java} $out/bin/
|
2014-08-25 21:43:14 +00:00
|
|
|
wrapProgram $out/bin/processing --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
2014-08-31 20:45:37 +00:00
|
|
|
wrapProgram $out/bin/processing-java --prefix PATH : ${jre}/bin --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
2014-08-25 21:43:14 +00:00
|
|
|
mkdir $out/java
|
|
|
|
ln -s ${jre}/bin $out/java/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A language and IDE for electronic arts";
|
|
|
|
homepage = http://processing.org;
|
2014-08-30 17:53:47 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2014-08-25 21:43:14 +00:00
|
|
|
maintainers = [ maintainers.goibhniu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|