2015-07-21 16:18:21 +02:00
|
|
|
{ fetchurl, stdenv, ant, jdk, makeWrapper, libXxf86vm, which }:
|
2014-08-25 23:43:14 +02:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
2015-07-21 16:18:21 +02:00
|
|
|
buildInputs = [ ant jdk makeWrapper libXxf86vm which ];
|
2014-08-25 23:43:14 +02:00
|
|
|
|
|
|
|
buildPhase = "cd build && ant build";
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-09-02 00:25:18 +02:00
|
|
|
mkdir -p $out/${name}
|
2014-08-25 23:43:14 +02:00
|
|
|
mkdir -p $out/bin
|
2014-09-02 00:25:18 +02:00
|
|
|
cp -r linux/work/* $out/${name}/
|
|
|
|
makeWrapper $out/${name}/processing $out/bin/processing \
|
2016-08-23 00:06:51 +02:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ jdk which ]}" \
|
2014-09-02 00:25:18 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
|
|
|
makeWrapper $out/${name}/processing-java $out/bin/processing-java \
|
2016-08-23 00:06:51 +02:00
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ jdk which ]}" \
|
2014-09-02 00:25:18 +02:00
|
|
|
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
2015-07-21 16:18:21 +02:00
|
|
|
ln -s ${jdk} $out/${name}/java
|
2014-08-25 23:43:14 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A language and IDE for electronic arts";
|
2017-08-03 21:35:49 +02:00
|
|
|
homepage = https://processing.org;
|
2014-08-30 19:53:47 +02:00
|
|
|
license = licenses.gpl2Plus;
|
2014-08-25 23:43:14 +02:00
|
|
|
maintainers = [ maintainers.goibhniu ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|