NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

Unable to use Blu-ray menus in VLC due to error complaining Java is missing #321924

Open alisonjenkins opened 3 months ago

alisonjenkins commented 3 months ago

Describe the bug

Unable to get Bluray menus working in VLC due to it being unable to find Java and reporting:

Java required:
This Blu-ray disc requires Java for menus support.Java was not found on your system.
The disc will be played without menus.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create an overlay using:
    bluray-playback = final: _prev: {
    libbluray = _prev.libbluray.override {
    withAACS = true;
    withBDplus = true;
    withJava = true;
    };
    };
  2. Use the overlay in your Nix overlays.
  3. Install VLC
  4. Load a bluray disk into the drive and open it via going to Media -> Open Disc then selecting Blu-ray then after ensuring the No disc menus checkbox is not ticked click the Play button.
  5. You will then be presented with the error message:
    Java required:
    This Blu-ray disc requires Java for menus support.Java was not found on your system.
    The disc will be played without menus.
  6. I have also tried setting:
    environment = {
    variables = {
    JAVA_HOME = "${pkgs.jdk}";
    };
    };

Expected behavior

Java would be found by VLC and then Blu-ray menus would load and work without throwing an error in VLC.

Screenshots

image

Additional context

N/A

Notify maintainers

@AndersonTorres @alois31 @abbradar

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.9.5-cachyos, NixOS, 24.11 (Vicuna), 24.11.20240620.d603719`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/xfpiyfgf6y30fxk5ngv0cjn474qfr3sj-source`

Add a :+1: reaction to issues you find important.

Jdogzz commented 3 months ago

Along with that package overlay I found that I needed the following in my configuration.nix:

  programs.java = {
    enable = true;
    package = pkgs.jdk17;
  };

After rebuilding and rebooting, VLC was able to pick up everything it needed.

alisonjenkins commented 3 months ago

Along with that package overlay I found that I needed the following in my configuration.nix:

  programs.java = {
    enable = true;
    package = pkgs.jdk17;
  };

After rebuilding and rebooting, VLC was able to pick up everything it needed.

Hey @Jdogzz,

Thanks for sharing. I just tried this with my config and unfortunately mine still does not work. Do you have your configs in git somewhere so I can compare to see if I can see why mine isn't working?

To detail what I just tried:

  1. Adjust my programs.java package to be pkgs.jdk17.
  2. Unset JAVA_HOME in environment.
  3. Ran nixos-rebuild boot.
  4. Rebooted
  5. Confirmed JAVA_HOME was set to the jdk17 JVM.
  6. Ran VLC and attempted to load the Blu-ray menus.
  7. Got the same error stating the JVM could not be found.

Edit: My configs are here if anyone wants to look at them.

Thanks,

Alison Jenkins

Jdogzz commented 3 months ago

Sure thing, here are what I believe are the relevant lines:

Java https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L89

VLC overlay https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L103

VLC install https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L125

I'm rebuilding my fleet right now and I'll run a test on a fresh system. If I get failure I'll report back here.

alisonjenkins commented 3 months ago

Sure thing, here are what I believe are the relevant lines:

Java https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L89

VLC overlay https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L103

VLC install https://github.com/Jdogzz/nixosconfig/blob/master/configuration/configuration.nix#L125

I'm rebuilding my fleet right now and I'll run a test on a fresh system. If I get failure I'll report back here.

I can confirm I just got the menus working too, upon checking my overlay the withJava had gone awol (turns out I stashed it and hadn't realised). Thanks for your help @Jdogzz