2024-04-21 15:54:59 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchurl, ant, unzip, makeWrapper, jdk, jogl, rsync, ffmpeg, batik, wrapGAppsHook, libGL }:
|
2023-04-12 12:48:02 +00:00
|
|
|
let
|
2024-01-02 11:29:13 +00:00
|
|
|
buildNumber = "1293";
|
2023-04-12 12:48:02 +00:00
|
|
|
vaqua = fetchurl {
|
|
|
|
name = "VAqua9.jar";
|
|
|
|
url = "https://violetlib.org/release/vaqua/9/VAqua9.jar";
|
|
|
|
sha256 = "cd0b82df8e7434c902ec873364bf3e9a3e6bef8b59cbf42433130d71bf1a779c";
|
|
|
|
};
|
|
|
|
|
|
|
|
jna = fetchurl {
|
|
|
|
name = "jna-5.10.0.zip";
|
|
|
|
url = "https://github.com/java-native-access/jna/archive/5.10.0.zip";
|
|
|
|
sha256 = "B5CakOQ8225xNsk2TMV8CbK3RcsLlb+pHzjaY5JNwg0=";
|
|
|
|
};
|
|
|
|
|
|
|
|
flatlaf = fetchurl {
|
|
|
|
name = "flatlaf-2.4.jar";
|
|
|
|
url = "https://repo1.maven.org/maven2/com/formdev/flatlaf/2.4/flatlaf-2.4.jar";
|
|
|
|
sha256 = "NVMYiCd+koNCJ6X3EiRx1Aj+T5uAMSJ9juMmB5Os+zc=";
|
|
|
|
};
|
|
|
|
|
|
|
|
lsp4j = fetchurl {
|
|
|
|
name = "org.eclipse.lsp4j-0.19.0.jar";
|
|
|
|
url = "https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j/0.19.0/org.eclipse.lsp4j-0.19.0.jar";
|
|
|
|
sha256 = "sha256-1DI5D9KW+GL4gT1qjwVZveOl5KVOEjt6uXDwsFzi8Sg=";
|
|
|
|
};
|
|
|
|
|
|
|
|
lsp4j-jsonrpc = fetchurl {
|
|
|
|
name = "org.eclipse.lsp4j.jsonrpc-0.19.0.jar";
|
|
|
|
url = "https://repo1.maven.org/maven2/org/eclipse/lsp4j/org.eclipse.lsp4j.jsonrpc/0.19.0/org.eclipse.lsp4j.jsonrpc-0.19.0.jar";
|
|
|
|
sha256 = "sha256-ozYTkvv7k0psCeX/PbSM3/Bl17qT3upX3trt65lmM9I=";
|
|
|
|
};
|
|
|
|
|
|
|
|
gson = fetchurl {
|
|
|
|
name = "gson-2.9.1.jar";
|
|
|
|
url = "https://repo1.maven.org/maven2/com/google/code/gson/gson/2.9.1/gson-2.9.1.jar";
|
|
|
|
sha256 = "sha256-N4U04znm5tULFzb7Ort28cFdG+P0wTzsbVNkEuI9pgM=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
arch = {
|
|
|
|
x86_64 = "amd64";
|
|
|
|
}.${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name;
|
2023-04-12 12:48:02 +00:00
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "processing";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "processing";
|
2023-04-12 12:48:02 +00:00
|
|
|
repo = "processing4";
|
|
|
|
rev = "processing-${buildNumber}-${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
sha256 = "sha256-SzQemZ6iZ9o89/doV8YMv7DmyPSDyckJl3oyxJyfrm0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeBuildInputs = [ ant unzip makeWrapper wrapGAppsHook ];
|
2024-02-29 20:09:43 +00:00
|
|
|
buildInputs = [ jdk jogl ant rsync ffmpeg batik ];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
dontWrapGApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
runHook preBuild
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
echo "tarring jdk"
|
2024-01-02 11:29:13 +00:00
|
|
|
tar --checkpoint=10000 -czf build/linux/jdk-17.0.8-${arch}.tgz ${jdk}
|
2023-04-12 12:48:02 +00:00
|
|
|
cp ${ant}/lib/ant/lib/{ant.jar,ant-launcher.jar} app/lib/
|
|
|
|
mkdir -p core/library
|
2024-02-29 20:09:43 +00:00
|
|
|
ln -s ${jogl}/share/java/* core/library/
|
2023-04-12 12:48:02 +00:00
|
|
|
ln -s ${vaqua} app/lib/VAqua9.jar
|
|
|
|
ln -s ${flatlaf} app/lib/flatlaf.jar
|
|
|
|
ln -s ${lsp4j} java/mode/org.eclipse.lsp4j.jar
|
|
|
|
ln -s ${lsp4j-jsonrpc} java/mode/org.eclipse.lsp4j.jsonrpc.jar
|
|
|
|
ln -s ${gson} java/mode/gson.jar
|
|
|
|
unzip -qo ${jna} -d app/lib/
|
|
|
|
mv app/lib/{jna-5.10.0/dist/jna.jar,}
|
|
|
|
mv app/lib/{jna-5.10.0/dist/jna-platform.jar,}
|
|
|
|
ln -sf ${batik}/* java/libraries/svg/library/
|
|
|
|
cp java/libraries/svg/library/lib/batik-all-${batik.version}.jar java/libraries/svg/library/batik.jar
|
|
|
|
echo "tarring ffmpeg"
|
|
|
|
tar --checkpoint=10000 -czf build/shared/tools/MovieMaker/ffmpeg-5.0.1.gz ${ffmpeg}
|
|
|
|
cd build
|
|
|
|
ant build
|
|
|
|
cd ..
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-04-21 15:54:59 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
mkdir -p $out/share/
|
2024-01-02 11:29:13 +00:00
|
|
|
mkdir -p $out/share/applications/
|
|
|
|
cp -dp build/linux/${pname}.desktop $out/share/applications/
|
2023-04-12 12:48:02 +00:00
|
|
|
cp -dpr build/linux/work $out/share/${pname}
|
|
|
|
rmdir $out/share/${pname}/java
|
|
|
|
ln -s ${jdk} $out/share/${pname}/java
|
|
|
|
makeWrapper $out/share/${pname}/processing $out/bin/processing \
|
|
|
|
''${gappsWrapperArgs[@]} \
|
2024-04-21 15:54:59 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
|
2023-04-12 12:48:02 +00:00
|
|
|
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd
|
|
|
|
makeWrapper $out/share/${pname}/processing-java $out/bin/processing-java \
|
|
|
|
''${gappsWrapperArgs[@]} \
|
2024-04-21 15:54:59 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libGL ]}" \
|
2023-04-12 12:48:02 +00:00
|
|
|
--prefix _JAVA_OPTIONS " " -Dawt.useSystemAAFontSettings=lcd
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A language and IDE for electronic arts";
|
|
|
|
homepage = "https://processing.org";
|
2023-04-12 12:48:02 +00:00
|
|
|
license = with licenses; [ gpl2Only lgpl21Only ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ evan-goode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|