-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
[BUG] Using bottles on nonFHS systems (e.g. NixOS) #72
Comments
Hi thanks for being interested in bringing Bottles to NixOS. Packing runners externally could be a solution but the Bottles functions that searches and installs updates should be disabled (it would also change the nature of the program itself). It might be a good starting point to understand how Lutris (who also manages several runners) was ported to NixOS. |
Also I see this portion of code which I think is declaring where the ld library is located:
|
Thanks for elaborating a little bit. Yeah, I already assumed it would be the best way to do it like this. The lutris game runner uses I'll rewrite the derivation soon, than we'll see if it works flawlessly! |
Great, keep us updated! |
Actually I'm busy with exams preparation, but I'll keep working on it from time to time! |
No problem, thanks for your contribution. |
I'm finished so far. I've used steam-run-native as environment for packaging, which provides an FHS-conform environment (tailored to Proton and wine).
Any comments about the nix expression? Otherwise I'll submit it in the next days (after a little bit polishing)! 😄 Nix file:
|
Hope all is well with the exams! Thank you so much for your work and if you can open a new issue for the other issue so we can track it. While work has begun on a new version of bottles and some things have changed, I don't know if the problem also occurs with v3. We'll see. |
PR was merged: NixOS/nixpkgs#113825. I'll package v3/v4 at the point it's feature/GUI-complete at the same level as v2. 😀 I think we can close this for now… |
The v3 is currently the most stable release btw. Thanks for your support btw! |
I know :) But there are some graphical glitches in v3 under NixOS. Even with the default Adwaita theme. Especially under the main view for each bottle. I don't know if that's an NixOS only error (as I only have NixOS devices) or not. Maybe I'll debug that in a VM and open an issue if the glitches persist. Therefore I thought v3 wasn't stable yet ;) Mea culpa… |
Ah ok I didn't even think about it because I've never tried NixOS :D |
Describe the bug
I wanna maintain a
bottles
package for NixOS. Therefore I have written a (not yet polished) nix derivation (see under "Additional context"). The packaging itself is correct andbottles
execute without any further error.If you try to create a bottle,
bottles
respectively thelutris/proton/…
runner throws an error (see NixOS/nixpkgs#108256). The problem here is that the runners are downloaded from the github releases without further patching, what is unproblematic for the most Linux systems, but not for NixOS.NixOS has a store concept, what means the most files aren't at the place you would expect it to be. The extracted runners are now trying to use the loader
/lib64/ld-linux-x86-64.so.2
and don't find the LD binary. Actually the binary is somewhere like/nix/store/1yvpgm763b3hvg8q4gzpzmflr5674x4j-glibc-2.32-10/lib64/ld-linux-x86-64.so.2
.Normally you circumvent this situation with something like
patchelf
or usingautopatchelf
, but this is only applies to packaging. As the binaries are extracted at runtime, patching them would be required also at runtime, either frombottles
itself or maually from the user (throughpatchelf
e.g.). Both solutions are not that perfect, I think.A better solution could be packaging the different runners in seperate namespace, so they could be installed through the different tools (declarative, through
nix-env
, etc.), e.g.nixos.bottlesRunner.lutris-6.0-rc1-x86_64
; this would allow patching them.But therefore it would be needed that
bottles
looks for pre-installed runners. I don't know if it's better to load them directly from the nix-store or copy them to$XDG_DATA_HOME/bottles/runners
before using them.Please let me know what you think about that topic. 👍
Installation
To Reproduce
Steps to reproduce the behavior:
bottles
.Expected behavior
The runner binaries execute without any further error.
Desktop (please complete the following information):
Additional context
Nix file:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: