2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, xmlstarlet, makeWrapper, ant, jdk, rsync, javaPackages, libXxf86vm, gsettings-desktop-schemas }:
|
2018-04-17 17:24:47 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-17 04:21:00 +02:00
|
|
|
pname = "processing";
|
2020-06-24 10:22:09 +02:00
|
|
|
version = "3.5.4";
|
2018-04-17 17:24:47 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "processing";
|
|
|
|
repo = "processing";
|
2020-06-24 10:22:09 +02:00
|
|
|
rev = "processing-0270-${version}";
|
|
|
|
sha256 = "0cvv8jda9y8qnfcsziasyv3w7h3w22q78ihr23cm4an63ghxci58";
|
2018-04-17 17:24:47 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ant rsync makeWrapper ];
|
|
|
|
buildInputs = [ jdk ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# use compiled jogl to avoid patchelf'ing .so files inside jars
|
|
|
|
rm core/library/*.jar
|
|
|
|
cp ${javaPackages.jogl_2_3_2}/share/java/*.jar core/library/
|
|
|
|
|
2018-07-16 01:27:18 +02:00
|
|
|
# do not download a file during build
|
|
|
|
${xmlstarlet}/bin/xmlstarlet ed --inplace -P -d '//get[@src="http://download.processing.org/reference.zip"]' build/build.xml
|
|
|
|
install -D -m0444 ${fetchurl {
|
2020-06-24 10:22:09 +02:00
|
|
|
# Use archive.org link for reproducibility until the following issue is fixed:
|
|
|
|
# https://github.com/processing/processing/issues/5711
|
|
|
|
url = "https://web.archive.org/web/20200406132357/https://download.processing.org/reference.zip";
|
|
|
|
sha256 = "093hc7kc9wfxqgf5dzfmfp68pbsy8x647cj0a25vgjm1swi61zbi";
|
2018-07-16 01:27:18 +02:00
|
|
|
}
|
|
|
|
} ./java/reference.zip
|
|
|
|
|
2018-04-17 17:24:47 +02:00
|
|
|
# suppress "Not fond of this Java VM" message box
|
|
|
|
substituteInPlace app/src/processing/app/platform/LinuxPlatform.java \
|
|
|
|
--replace 'Messages.showWarning' 'if (false) Messages.showWarning'
|
|
|
|
|
|
|
|
( cd build
|
|
|
|
substituteInPlace build.xml --replace "jre-download," "" # do not download jre1.8.0_144
|
|
|
|
mkdir -p linux/jre1.8.0_144 # fake dir to avoid error
|
|
|
|
ant build )
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
2019-08-17 04:21:00 +02:00
|
|
|
cp -dpR build/linux/work $out/${pname}
|
2018-04-17 17:24:47 +02:00
|
|
|
|
2019-08-17 04:21:00 +02:00
|
|
|
rmdir $out/${pname}/java
|
|
|
|
ln -s ${jdk} $out/${pname}/java
|
2018-04-17 17:24:47 +02:00
|
|
|
|
2019-08-17 04:21:00 +02:00
|
|
|
makeWrapper $out/${pname}/processing $out/bin/processing \
|
2018-07-14 17:00:02 +02:00
|
|
|
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
|
2018-04-17 17:24:47 +02:00
|
|
|
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
2019-08-17 04:21:00 +02:00
|
|
|
makeWrapper $out/${pname}/processing-java $out/bin/processing-java \
|
2018-07-14 17:00:02 +02:00
|
|
|
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \
|
2018-04-17 17:24:47 +02:00
|
|
|
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \
|
|
|
|
--prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A language and IDE for electronic arts";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://processing.org";
|
2018-04-17 17:24:47 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|