processing: Move to gradle-based build#466611
Conversation
| ln -sf ${batik}/* java/libraries/svg/library/ | ||
| cp java/libraries/svg/library/share/java/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} |
There was a problem hiding this comment.
Note: I wasn't sure why this was needed before. Is it still required?
|
Upstream generates a binary called |
set meta.mainProgram to |
Unfortunate, this is a script-breaking and confusing change. Could we ship a |
Thanks, done!
Presumably this would put both |
d523975 to
c722d08
Compare
|
Does it make sense to upstream any of the patches @neobrain? |
| @@ -0,0 +1,24 @@ | |||
| diff --git a/app/build.gradle.kts b/app/build.gradle.kts | |||
There was a problem hiding this comment.
@Stefterv Without this patch, the build fails since it somehow doesn't find the createDistributable task. Does this make any sense to you?
processing> Running phase: buildPhase
processing> +++ gradle createDistributable
...
processing> FAILURE: Build failed with an exception.
processing>
processing> * Where:
processing> Build file '/build/source/app/build.gradle.kts' line: 536
processing>
processing> * What went wrong:
processing> Could not create task ':app:zipDistributable'.
processing> > Task with name 'createDistributable' not found in project ':app'.
We don't need the zip distributable either way, but its built automatically as part of "gradle assemble/createDistributable". Here are some options:
- Figure out where that error comes from and fix it (and then build the zip distributable and throw it away)
- Use another command than
gradle assemble/createDistributablethat only builds required files (if that exists?) - Keep this ugly patch in nixpkgs to skip the target
There was a problem hiding this comment.
I have had issues before that the tasks generated by the Compose Packager are unavailable until later in the evaluation of the gradle files
There was a problem hiding this comment.
Just also noticed that on the latest commit this has been refactored a bit. Could you check if it happens to be working rn
There was a problem hiding this comment.
Is 4.5.2 recent enough or would I have to try latest git?
4.5.2 still has the same error.
There was a problem hiding this comment.
Same error with 735bfa6 :(
There was a problem hiding this comment.
I have had issues before that the tasks generated by the Compose Packager are unavailable until later in the evaluation of the gradle files
Is there a way to eagerly trigger generation of these CP tasks?
There was a problem hiding this comment.
Just cleaned up the existing approach and added a comment about it for now.
(btw, quick reminder that the nixpkgs review queue is prioritized by number of upvotes on the PR description 😇 ) |
| cp -dpr app/build/compose/binaries/main/app/Processing/bin $out/unwrapped | ||
|
|
||
| mkdir -p $out/share/applications/ | ||
| cp -dp build/linux/${pname}.desktop $out/share/applications/ |
There was a problem hiding this comment.
this .desktop file is old and will be deleted soon
There was a problem hiding this comment.
Is there a replacement? Remember Linux apps don't typically get taskbar/tabswitcher icons without desktop files.
There was a problem hiding this comment.
There was a problem hiding this comment.
Where does the deb come from? Does gradle generate it automatically for you?
Nix can write its own desktop file if need be, though it still needs to know where to find official icons etc.
| @@ -0,0 +1,24 @@ | |||
| diff --git a/app/build.gradle.kts b/app/build.gradle.kts | |||
There was a problem hiding this comment.
This PR is merged so the patch can be removed no?
There was a problem hiding this comment.
nixpkgs pins package versions, so it still builds processing 4.4.10. We can trivially update in a follow-up once my PR is merged though. (That being said, dropping the patch from nixpkgs also requires upstream/you to ship the PR in a release, which I think hasn't happened yet?)
d1ecaca to
0dd7ec2
Compare
|
|
@Stefterv @evan-goode Could we move forward with this? The deprecated ant build is not a robust base for future Processing version updates, and once this PR is in we can easily update from 4.4.10 to the current 4.5.2. |
|
All good with me, would just mention that a 4.5.3 is incoming... |
|
Works great in my testing! My only lingering complaint is the
I would prefer having both |
0dd7ec2 to
339fcf8
Compare
Thanks for giving it a spin!
Fair enough, I adopted the symlink approach from the FreeCAD derivation so that we get both |
Gentle ping now that there's both, is there anything more to do here? :) |
|
@uninsane Apologies for the ping, but any chance this could be queued for merging? The change enables future package updates (while also fixing functionality that was broken before) and has approval by upstream & by the nixpkgs maintainer. |
There was a problem hiding this comment.
| (fetchurl { | |
| # Remove after next release | |
| name = "dir-permissions"; | |
| url = "https://github.com/processing/processing4/commit/9156f46974be1ff69ee3d1b6c5457e09477ea751.patch?full_index=1"; | |
| hash = "sha256-jc6KWhal9zLHU7QWT26XUmIIF+2C3itiaflxUEazqBQ="; | |
| }) |
& remove the vendored fix-permissions.patch file
There was a problem hiding this comment.
Oof, bad news: The upstream patch doesn't actually work for me. So I reverted back to the vendored patch for now :/
There was a problem hiding this comment.
@Stefterv Did you intentionally patch the includeJavaMode step upstream instead of the includeJdk one? That seems to be the main difference between the two changes.
339fcf8 to
adcb339
Compare
Upstream changed the executable name to uppercase. Creating a symlink with the old name prevents breaking existing scripts.
adcb339 to
65cc689
Compare
|
|
it's fine to sort out the patch/upstream discrepancies after merging / in a separate PR. |
|
Great, thanks again for the reviews everyone :) |
Resolves NixOS#501949. Following NixOS#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 drops use of upstream's deprecated ant build system in favor of the Gradle build scripts introduced in Processing 4.4.
Doing so has the nice side effect of enabling some previously broken functionality such as examples not being bundled.
Things done
[ ] NixOS tests in nixos/tests.[ ] Package tests atpassthru.tests.[ ] Tests in lib/tests or pkgs/test for functions and "core" functionality.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.[ ] Package update: when the change is major or breaking.[ ] Module addition: when adding a new NixOS module.[ ] Module update: when the change is significant.Add a 👍 reaction to pull requests you find important.