diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2019-08-16 22:21:00 -0400 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2019-08-16 22:22:03 -0400 |
commit | 939cd1bf4c1a9eb633870d76b192e5440429e0c5 (patch) | |
tree | 7406c494e8636e194f2ffee6b543cd32cdeefc4c /pkgs/applications/graphics/processing | |
parent | 33d377798638de5ec8dae521047d425f0be23b8a (diff) |
processing: 3.4 -> 3.5.3
Diffstat (limited to 'pkgs/applications/graphics/processing')
-rw-r--r-- | pkgs/applications/graphics/processing/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/processing/default.nix b/pkgs/applications/graphics/processing/default.nix new file mode 100644 index 0000000000000..9972ea7570982 --- /dev/null +++ b/pkgs/applications/graphics/processing/default.nix @@ -0,0 +1,63 @@ +{ stdenv, fetchFromGitHub, fetchurl, xmlstarlet, makeWrapper, ant, jdk, rsync, javaPackages, libXxf86vm, gsettings-desktop-schemas }: + +stdenv.mkDerivation rec { + pname = "processing"; + version = "3.5.3"; + + src = fetchFromGitHub { + owner = "processing"; + repo = "processing"; + rev = "processing-0269-${version}"; + sha256 = "0ajniy3a0i0rx7is46r85yh3ah4zm4ra1gbllmihw9pmnfjgfajn"; + }; + + 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/ + + # 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 { + url = http://download.processing.org/reference.zip; + sha256 = "198bpk8mzns6w5h0zdf50wr6iv7sgdi6v7jznj5rbsnpgyilxz35"; + } + } ./java/reference.zip + + # 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 + cp -dpR build/linux/work $out/${pname} + + rmdir $out/${pname}/java + ln -s ${jdk} $out/${pname}/java + + makeWrapper $out/${pname}/processing $out/bin/processing \ + --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \ + --prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \ + --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib + makeWrapper $out/${pname}/processing-java $out/bin/processing-java \ + --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name} \ + --prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd \ + --prefix LD_LIBRARY_PATH : ${libXxf86vm}/lib + ''; + + meta = with stdenv.lib; { + description = "A language and IDE for electronic arts"; + homepage = https://processing.org; + license = licenses.gpl2Plus; + platforms = platforms.linux; + }; +} |