processing: Use jogl from nixpkgs
Resolves https://github.com/NixOS/nixpkgs/issues/501949. Following https://github.com/NixOS/nixpkgs/pull/466611, JOGL from Maven was being used instead of JOGL in nixpkgs. The nixpkgs JOGL contains a patch to nixify a reference to /bin/true. Assisted-by: GLM-5
This commit is contained in:
@@ -72,6 +72,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# dirPermissions: Without this, some gradle tasks (e.g. includeJdk) fail to copy contents of read-only subfolders within the nix store
|
||||
./fix-permissions.patch
|
||||
|
||||
# Use jogl from nixpkgs instead of downloading from maven
|
||||
./use-nixpkgs-jogl.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -104,8 +107,7 @@ stdenv.mkDerivation rec {
|
||||
runHook preBuild
|
||||
runHook preGradleUpdate
|
||||
|
||||
mkdir -p app/lib core/library
|
||||
ln -s ${jogl}/share/java/* core/library/
|
||||
mkdir -p app/lib
|
||||
ln -s ${vaqua} app/lib/VAqua9.jar
|
||||
ln -s ${flatlaf} app/lib/flatlaf.jar
|
||||
ln -s ${lsp4j} java/mode/org.eclipse.lsp4j.jar
|
||||
@@ -129,13 +131,15 @@ stdenv.mkDerivation rec {
|
||||
substituteInPlace app/build.gradle.kts \
|
||||
--replace-fail "https://github.com/processing/processing-examples/archive/refs/heads/main.zip" "https://github.com/processing/processing-examples/archive/b10c9e9a05a0d6c20d233ca7f30d315b5047720e.zip" \
|
||||
--replace-fail "https://github.com/processing/processing-website/archive/refs/heads/main.zip" "https://github.com/processing/processing-website/archive/f11676d1b7464291a23ae834f2ef6ab00baaed8e.zip"
|
||||
|
||||
substituteInPlace core/build.gradle.kts \
|
||||
--replace-fail "@@joglPath@@" "${jogl}"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
mkdir -p app/lib core/library
|
||||
ln -s ${jogl}/share/java/* core/library/
|
||||
mkdir -p app/lib
|
||||
ln -s ${vaqua} app/lib/VAqua9.jar
|
||||
ln -s ${flatlaf} app/lib/flatlaf.jar
|
||||
ln -s ${lsp4j} java/mode/org.eclipse.lsp4j.jar
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/core/build.gradle.kts b/core/build.gradle.kts
|
||||
index 8f7211b13..82c229f76 100644
|
||||
--- a/core/build.gradle.kts
|
||||
+++ b/core/build.gradle.kts
|
||||
@@ -29,8 +29,7 @@ sourceSets{
|
||||
}
|
||||
|
||||
dependencies {
|
||||
- implementation(libs.jogl)
|
||||
- implementation(libs.gluegen)
|
||||
+ implementation(fileTree("@@joglPath@@/share/java") { include("*.jar") })
|
||||
|
||||
testImplementation(libs.junit)
|
||||
}
|
||||
Reference in New Issue
Block a user