Skip to content

audiveris: init at 5.5.3#361701

Open
twz123 wants to merge 1 commit intoNixOS:masterfrom
twz123:init-audiveris
Open

audiveris: init at 5.5.3#361701
twz123 wants to merge 1 commit intoNixOS:masterfrom
twz123:init-audiveris

Conversation

@twz123
Copy link
Member

@twz123 twz123 commented Dec 4, 2024

Audiveris Music Scanner, an open source Optical Music Recognition (OMR) engine.

This is an alternative to #282848, as I forgot to check open PRs before starting to create a package for myself 🙈. Anyhow, since I just started a fresh package from scratch, this PR uses the new Gradle setup hook. That's why I opted to open another PR.

Closes #282848

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 4, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 4, 2024
@github-actions github-actions bot removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 5, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 6, 2024
@FliegendeWurst
Copy link
Member

Build fails with download error. Similar issue when trying to update the cache:

Execution failed for task ':nixDownloadDeps'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find javax.media.jai:com.springsource.javax.media.jai.core:1.1.3.
     Searched in the following locations:
       - https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/javax/media/jai/com.springsource.javax.media.jai.core/1.1.3/com.springsource.javax.media.jai.core-1.1.3.pom
       - https://repository.springsource.com/maven/bundles/external/javax/media/jai/com.springsource.javax.media.jai.core/1.1.3/com.springsource.javax.media.jai.core-1.1.3.pom
       - file:/homeless-shelter/.m2/repository/javax/media/jai/com.springsource.javax.media.jai.core/1.1.3/com.springsource.javax.media.jai.core-1.1.3.pom
       - https://repo.maven.apache.org/maven2/javax/media/jai/com.springsource.javax.media.jai.core/1.1.3/com.springsource.javax.media.jai.core-1.1.3.pom
     Required by:
         root project : > de.intarsys.opensource:jPodRenderer:5.6

@FliegendeWurst FliegendeWurst marked this pull request as draft March 1, 2025 21:17
@FliegendeWurst
Copy link
Member

@FliegendeWurst
Copy link
Member

FliegendeWurst commented Mar 1, 2025

The download issues are fixed with version 5.4, now it fails with:

A problem occurred configuring root project 'Audiveris'.
> Could not create task ':writeClasspathFile'.
   > Could not get unknown property 'runtimeClasspath' for configuration container for root project 'Audiveris' of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.

@twz123 twz123 changed the title audiveris: init at 5.3.1 audiveris: init at 5.5.3 Apr 28, 2025
@FliegendeWurst FliegendeWurst marked this pull request as ready for review April 28, 2025 12:26
Copy link
Member

@FliegendeWurst FliegendeWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Program launches, did not test further.

Comment on lines 91 to 112
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure you need the smaller sizes

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure either what the typical sizes should be. Will do whatever you think is appropriate.

Another option would be to use the upstream ico file and take all the sizes from there, e.g. like this:

mapfile -t iconSizes < <(magick identify -format '%wx%h\n' app/res/all-icons-256.ico)
i=0
for iconSize in "''${iconSizes[@]}"; do
  magick convert app/res/all-icons-256.ico"[$((i++))]" +set date:create +set date:modify icon.png
  install -D -m0644 icon.png "$out/share/icons/hicolor/$iconSize/apps/audiveris.png"
done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracting them from the ico sounds good, yes. FWIW I don't know of any software that would need X px icons if Y px icons (Y > X) are available. I see lots of derivations that just install one size (256px for example), and nobody complained so far.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Exec=$out/bin/audiveris
Exec=audiveris

This is preferred #308324.
Even better would be to use createDesktopItem and copyDesktopItems.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better! Done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it less confusing you could set the last one to "nixpkgs" (line 47).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

Co-authored-by: FliegendeWurst <arne.keller@posteo.de>
@FliegendeWurst
Copy link
Member

I think you need to add something like this to the update script

    gradle nixDownloadDeps -Dos.family=linux -Dos.arch=amd64
    gradle nixDownloadDeps -Dos.family=linux -Dos.arch=aarch64
    gradle nixDownloadDeps -Dos.name='mac os x' -Dos.arch=amd64
    gradle nixDownloadDeps -Dos.name='mac os x' -Dos.arch=aarch64

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Nov 8, 2025
Copy link
Contributor

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unfamiliar with gradle packaging, but I'll read up more after the new year.
I'll also test this within the next week.

tesseract,
freetype,
testers,
audiveris,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
audiveris,

'';

passthru.tests.version = testers.testVersion {
package = audiveris;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
package = audiveris;
package = finalAttrs.finalPackage;

];
mainProgram = "audiveris";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ twz123 ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to adopt this as well

Suggested change
maintainers = with lib.maintainers; [ twz123 ];
maintainers = with lib.maintainers; [ eclairevoyant twz123 ];

Comment on lines +108 to +113
for size in 16 24 32 48; do
# set modify/create for reproducible builds
gm convert app/res/icon-64.png -scale $size +set date:create +set date:modify icon.png
install -D -m0644 icon.png "$out/share/icons/hicolor/''${size}x$size/apps/audiveris.png"
done
unset size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably overkill, but I won't consider it a blocker either way atm

}:
let
# Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
gradle = gradle_8;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could upgrade to gradle 9 here, as of version 5.7:
https://github.com/Audiveris/audiveris/blob/9b017ff6e16c6da889b4d88718ca0458c9e57d4e/docs/_pages/reference/updates.md?plain=1#L57-L73

Once this package is accepted, I'll work on an update script to make this more automatic.

@nixpkgs-ci nixpkgs-ci bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 25, 2025
@eclairevoyant
Copy link
Contributor

@twz123 Are you still planning to work on this? I plan to open a PR in a week if I haven't heard back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants