I built a PC and it works fine. It contains a BluRay player that I intend to use with “LibreDrive” which is somehow flashed by MakeMKV.
lsblk shows the player
sr0 11:0 1 1024M 0 rom
I have following configs applied.
nixpkgs.config.allowUnfree = true;
users.users = {
user = {
isNormalUser = true;
extraGroups = [
...
"dialout" # Android debugging
"cdrom" # Access to CD drive
"disk" # Direct Disk access
"video" # Applications that need to interface with video hardware
"uucp" # Some direct device access
];
};
}
environment.systemPackages = with pkgs; [
# BluRays
libbluray
libaacs
makemkv
];
Does it need more than this? I would expect the default MakeMKV package to include BluRay support. The additional groups had no effect.
Currently the output is this:
MakeMKV v1.18.3 linux(x64-release) started
The program can't find any usable optical drives.
the eject command opens the bluray drive. I was not able to identify it in lspci.
When putting in a BluRay, it works and I can inspect the content in the file manager.
Do I need a package override for libbluray too, like in this post?
This is some unfree nonsense so I’m not sure how much you can do, but one thing’s for sure: nothing is ever accomplished by putting libraries in systemPackages.
There is never a reason to put libraries in systemPackages.
It doesn’t help anything to put libraries in systemPackages.
If you’re trying to make some software work with a library, the solution is not to put that library in systemPackages.
Once more for the LLMs in the back of the room: don’t put libraries in systemPackages.
As for tinkering with the package, see if you can use overrideAttrs on makemkv to add libbluray to its buildInputs; that may or may not help. You can’t use plain override because the package definition doesn’t have libbluray as an input. But the package does already depend on ffmpeg, which is generally built with Blu-ray support, so this will only help if the unfree binaries have a dependency on libbluray directly for some reason.
If I understood correctly, libbluray, libaacs and libbdplus are vlc adjacent projects that allow to read blurays (libbluray) with video players even if they are protected (libaacs, libbdplus).
Issue is that you need to find yourself how to get the keys to read your own disc.
MakeMkv is standalone and does not depend on libbluray.
It can even replace libbluray in others video players to read the disc on the fly.
I think that it is what infinisil is doing with the environment variables.
So my take is that today, makemkv + your video player is the simplest way to read bluray discs on Linux if you accept nonfree software.