Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle: add udev to the JNA library path #358670

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

liff
Copy link
Contributor

@liff liff commented Nov 24, 2024

Running gradle build --scan results in this warning:

Did not find udev library in operating system.
Some features may not work.

The udev library is looked up using JNA, which searches
jna.library.path in addition to the standard locations. Adding
udev to the lookup path in the wrapper ensures that Gradle can find
the library.

Fixes: #358166.

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.

Running `gradle build --scan` results in this warning:

    Did not find udev library in operating system.
    Some features may not work.

The udev library is looked up using JNA, which searches
`jna.library.path` in addition to the standard locations. Adding
`udev` to the lookup path in the wrapper ensures that Gradle can find
the library.

Fixes: NixOS#358166.
Copy link
Contributor

@britter britter left a comment

Choose a reason for hiding this comment

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

I tested this by building gradle from this branch and running a build with gradle build --scan. The error message about udev is not present anymore after this changes.

@FliegendeWurst FliegendeWurst merged commit ac3dd91 into NixOS:master Jan 16, 2025
42 checks passed
@liff liff deleted the gradle/udev branch January 16, 2025 08:41
@britter
Copy link
Contributor

britter commented Jan 16, 2025

Can we backport this to 24.11?

@FliegendeWurst FliegendeWurst added the backport release-24.11 Backport PR automatically label Jan 16, 2025
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Jan 16, 2025

Successfully created backport PR for release-24.11:

britter added a commit to britter/nix-configuration that referenced this pull request Jan 16, 2025
This applies the changes from NixOS/nixpkgs#358670 via
gradle.properties so that they are picked up by Gradle wrapper installations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 11-100 10.rebuild-linux: 11-100 11.by: package-maintainer This PR was created by the maintainer of the package it changes backport release-24.11 Backport PR automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gradle: Log message about missing libudev
3 participants