Skip to content

lutris: init at 0.5.2.1 - #61742

Merged
infinisil merged 3 commits into
NixOS:masterfrom
abbradar:lutris
May 27, 2019
Merged

infinisil merged 3 commits into
NixOS:masterfrom
abbradar:lutris

Conversation

@abbradar

@abbradar abbradar commented May 20, 2019 •

Copy link
Copy Markdown
Member
Motivation for this change

This is a rebase and update for #42075 . Together with #61740 this provides working Lutris with Steam integration.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@abbradar abbradar mentioned this pull request May 20, 2019
6 of 8 tasks
@abbradar

Copy link
Copy Markdown
Member Author

Added reviewers for the original PR here.

@abbradar abbradar added the 8.has: package (new) This PR adds a new package label May 20, 2019
@ofborg ofborg 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 May 20, 2019
@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown

You can probably condense down most of my commits to make the log a bit cleaner.

@teto

teto commented May 20, 2019

Copy link
Copy Markdown
Member

<3 compiles and runs here. I had a warning about vulkan.
I am not sure how to add games but anyway I don't have enough space to install any thanks to nix :p

@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown

What was the warning about vulkan?
During compilation, or during runtime?

@abbradar

Copy link
Copy Markdown
Member Author

That warning is on the startup; it's because Lutris tries to find Vulkan libraries with ldconfig and fails because it doesn't work on NixOS. Vulkan should still work.

I had a project long time ago to use ld.so.cache in FHS environments but it was more trouble than it was worth. We can patch this check out instead if we want to.

@teto

teto commented May 20, 2019

Copy link
Copy Markdown
Member

a runtime popup saying some games might not be supported. This might be related to my driver. It's a workstation so I haven't check the opengl installation. I was just wondering if it was a missing lutris component or just my deficient setup

Result from a nix-buil

/usr/bin/ldconfig: Can't open cache file /nix/store/xqs95fqkjb1kd102yjv5h5q57gcsafb3-glibc-2.27/etc/ld.so.cache
: No such file or directory
2019-05-20 20:27:39,501: Failed to get libraries from ldconfig: Command '['/usr/bin/ldconfig', '-p']' returned non-zero exit status 1.
2019-05-20 20:27:41,003: Running Lutris 0.5.2.1
2019-05-20 20:27:41,004: Running migration: fix_playtime
2019-05-20 20:27:41,005: Using nouveau
2019-05-20 20:27:41,005: Running Mesa driver 18.3.4 on NV137 (0x1cb1)
2019-05-20 20:27:41,005: GPU: 10DE:1CB1 10DE:11BC using nouveau drivers
2019-05-20 20:27:41,006: i386 libGL.so.1 missing (needed by opengl)
2019-05-20 20:27:41,006: x86_64 libGL.so.1 missing (needed by opengl)
2019-05-20 20:27:41,006: i386 libvulkan.so.1 missing (needed by vulkan)
2019-05-20 20:27:41,006: x86_64 libvulkan.so.1 missing (needed by vulkan)
2019-05-20 20:27:47,243: Vulkan is not available or your system isn't Vulkan capable
2019-05-20 20:27:51,285: Updating DXVK versions
2019-05-20 20:27:52,753: Runtime Ubuntu-18.04-i686 is not available locally
2019-05-20 20:27:52,754: Runtime Ubuntu-18.04-x86_64 is not available locally
2019-05-20 20:27:52,761: Runtime winetricks is not available locally
2019-05-20 20:27:52,762: Runtime x360ce is not available locally
2019-05-20 20:27:52,764: Runtime dumbxinputemu is not available locally
2019-05-20 20:27:52,767: Runtime gamecontrollerdb is not available locally
2019-05-20 20:27:52,772: Runtime steam is not available locally
2019-05-20 20:27:52,775: Runtime lib64 is not available locally
2019-05-20 20:27:52,778: Runtime lib32 is not available locally
2019-05-20 20:27:52,780: Runtime p7zip is not available locally
2019-05-20 20:27:52,885: Non existent path: /home/teto/.local/share/lutris/runtime/p7zip
2019-05-20 20:27:53,673: Non existent path: /home/teto/.local/share/lutris/runtime/gamecontrollerdb
2019-05-20 20:27:54,173: Non existent path: /home/teto/.local/share/lutris/runtime/winetricks
2019-05-20 20:27:54,173: Non existent path: /home/teto/.local/share/lutris/runtime/x360ce
2019-05-20 20:27:54,477: Non existent path: /home/teto/.local/share/lutris/runtime/dumbxinputemu
2019-05-20 20:27:56,783: Non existent path: /home/teto/.local/share/lutris/runtime/Ubuntu-18.04-i686
2019-05-20 20:27:56,785: Non existent path: /home/teto/.local/share/lutris/runtime/Ubuntu-18.04-x86_64
2019-05-20 20:27:56,910: Non existent path: /home/teto/.local/share/lutris/runtime/lib32
2019-05-20 20:27:57,206: Non existent path: /home/teto/.local/share/lutris/runtime/lib64
2019-05-20 20:27:58,727: Non existent path: /home/teto/.local/share/lutris/runtime/steam
2019-05-20 20:28:13,932: Runtime updated

@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown

Are there any ideas on how to get ldconfig and perhaps other similar tools to work with NixOS?
Seems like this is something that ought to be researched and fixed if possible.

@abbradar

Copy link
Copy Markdown
Member Author

@Chiiruno Possible in FHS environments but would require an stdenv rebuild and significant changes. I think I did a PR and the conclusion was that it would be too much changes for too little gain; I'll search for it later.

@abbradar

Copy link
Copy Markdown
Member Author

@Chiiruno Ah, I completely forgot to ask - do you remember why you added python2 and gnome2 dependencies? I tried to remove them locally and didn't observe any change.

@grahamc

grahamc commented May 20, 2019

Copy link
Copy Markdown
Member

Nice to see you here, @abbradar!

@abbradar

abbradar commented May 20, 2019 via email

Copy link
Copy Markdown
Member Author

@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown

@abbradar I don't quite remember, it may have been fixed by pulling in the python and gtk/gnome nix stuff. So, maybe not necessary anymore.

@abbradar
abbradar force-pushed the lutris branch 2 times, most recently from 480b349 to 660c553 Compare May 20, 2019 19:21
@abbradar

Copy link
Copy Markdown
Member Author

I merged all commits for lutris into one commit with mentions of us three for clarity. Is this okay for you, @Chiiruno, @yegortimoshenko? I also removed gnome2/python2 dependencies.

@infinisil

Copy link
Copy Markdown
Member

It would be awesome if people could test this package and report what games work and which ones don't

@ghost

ghost commented May 20, 2019

Copy link
Copy Markdown

@abbradar Yeah, I'm fine with that.

@abbradar
abbradar force-pushed the lutris branch 2 times, most recently from 5df6677 to 4ed9de7 Compare May 20, 2019 19:52
@minijackson

Copy link
Copy Markdown
Member

I've tested for a bit, but couldn't manage to run Steam from Lutris (Note: I don't have steam in my systemPackages/user packages):

2019-05-21 21:00:49,199: Runtime disabled by system configuration
Running /nix/store/6vpgynlgifmrxzr1pw1acfr08da154ic-steam/bin/steam

** (process:7692): WARNING **: 21:00:49.563: chrootenv doesn't stack!
** Message: 21:00:49.564: Requires Linux version >= 3.19 built with CONFIG_USER_NS

** (process:7694): ERROR **: 21:00:49.565: main: unshare: Operation not permitted
Waiting on children
Exit with returncode -5

Unfortunately I have no idea where the "unshare" comes from :-/

Kernel is 4.19.44 and CONFIG_USER_NS is enabled

Here's what I did to test this Lutris:

# From local nixpkgs
git fetch upstream pull/61742/head:
git checkout FETCH_HEAD
nix build -f . lutris
./result/bin/lutris

@abbradar

abbradar commented May 21, 2019 via email

Copy link
Copy Markdown
Member Author

@minijackson

Copy link
Copy Markdown
Member

Oh I see, thank you!

@TheSirC

TheSirC commented May 21, 2019

Copy link
Copy Markdown

For this to work you need another PR merged in your tree - look in this PR description (it's difficult to quickly find from phone, sorry).

So for those following at $HOME (@minijackson), he is talking about #61740 (it is in the description post of this PR):

This is a rebase and update for #42075 . Together with #61740 this provides working Lutris with Steam integration.

@JohnAZoidberg JohnAZoidberg mentioned this pull request May 24, 2019
2 of 14 tasks
@infinisil

Copy link
Copy Markdown
Member

Data point: Testing Minecraft with the new launcher (the very bottom option of the installer list):

...
2019-05-25 00:08:45,393: Connected to lutris.net as infinisil
2019-05-25 00:08:48,843: Runtime disabled by system configuration
2019-05-25 00:08:48,899: Runtime disabled by system configuration
Running ./minecraft-launcher
./minecraft-launcher: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
Waiting on children
Exit with returncode 127
2019-05-25 00:08:50,904: Game still running (state: running)
2019-05-25 00:08:50,905: Stopping Minecraft (linux)

Even after adding nssTools to deps I get the same error.

Original derivation for version 0.4.18 by Chiiruno.
With minor fixes by yegortimoshenko.
Updated by 0.5.2.1 by abbradar.
@abbradar

Copy link
Copy Markdown
Member Author

Added glib_networking (someone mentioned it's needed for GOG) and nss for Minecraft. @infinisil can you test if it works now?

Either way let's merge soon and fix issues with particular games via follow-up PRs. I'll do it in several days unless any objections arise.

@teto

teto commented May 25, 2019

Copy link
Copy Markdown
Member

agreed we'll have more feedback when it gets more widely available. It has been lurking long enough.

@infinisil

Copy link
Copy Markdown
Member

Thanks, that at least worked for that specific error, then I needed to add a whole bunch more stuff:

  • nspr
  • gnome2.GConf
  • libXdamage
  • libXfixes
  • libXtst
  • libXScrnSaver

This made the launcher succeed, but to actually launch the game I also needed to add jdk for Java.

I'm wondering, will every game require having to tweak the dependencies? Because that seems far from optimal. On other distro's you can just install the libraries needed and be done, and lutris probably expects that, but with NixOS's buildFHSUserEnv I don't think that's possible.

@abbradar

abbradar commented May 25, 2019 via email

Copy link
Copy Markdown
Member Author

@pstn

pstn commented May 26, 2019 •

Copy link
Copy Markdown
Contributor

Maybe we could add some options to the package like javaLibs and then add the needed libs. Then everybody could collaborate on what libraries are actually needed and we wouldn't need to blow up the package size because not everything needs to be enabled by default.

@infinisil

Copy link
Copy Markdown
Member

For reference, this packages currently has a closure size of ~6.3GB

@L-as

L-as commented May 27, 2019

Copy link
Copy Markdown
Member

Are there any blockers for this, disregarding the closure size?

@infinisil

Copy link
Copy Markdown
Member

I guess we can merge this for now and handle problems as they arise (as mentioned by @abbradar and @teto already), hopefully having most things working until 19.09.

@infinisil
infinisil merged commit 68cae99 into NixOS:master May 27, 2019
@infinisil

Copy link
Copy Markdown
Member

Unfortunately #61740 can't be merged right away due to a conflict, so steam integration won't be working until then.

@matthiasbeyer

Copy link
Copy Markdown
Contributor

Quick question: Does lutris really need steam as hard-coded dependency? Doesn't it work without steam? Because (as far as I understand) running MTGarena for example only requires wine, but not steam.

Or am I wrong here?

@abbradar

Copy link
Copy Markdown
Member Author

That's the main problem with the whole Lutris package currently -- it's not modular. In the end I think we should ask users to install needed packages separately because buildFHSUserEnv propagates user PATH now. So users can install wine, steam etc by themselves and they will just work. This isn't so simple with libraries of course but still is an improvement.

@joepie91

Copy link
Copy Markdown

@abbradar I would then propose having two Lutris package variants:

  • lutris, which has Steam and WINE and all the other stuff it might need, as a dependency.
  • lutrisLite or so, which is only Lutris itself, and either a) depends on PATH or b) has some overridable attributes to enable specific dependencies/services/etc.

The objective of this would be to have the 'regular' package be one that Just Works (ie. if the user installs the obvious thing, they will not run into mysterious failures that require documentation reading), but to still offer a lighter-weight option for those who need or prefer it.

Given that the goal of Lutris is explicitly to combine multiple different game sources into one tool, I think it would be reasonable (and aligning with user expectations) to install a large pile of dependencies alongside it by default. That is, after all, usually why somebody would use Lutris - because they just want everything to work right away. If they only wanted support for one game source, they probably just would've used that source directly.

@ghost

ghost commented Jun 18, 2019

Copy link
Copy Markdown

@olynch

olynch commented Jun 20, 2019

Copy link
Copy Markdown
Contributor

I got an error when I tried to install League of Legends; it seems like AppImages don't work even in the FHS,

Running /home/olynch/Games/league-of-legends/wine-staging-i386_lol-patched_x86_64-bionic.AppImage wine wineboot
fusermount: /nix/store/v6l2sacryfr88yqq0pq7sia8wfgm9q31-wrapper.c:203: main: Assertion `!(st.st_mode & S_ISUID) || (st.st_uid == geteuid())' failed.

Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage
if you run it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
open dir error: No such file or directory
Waiting on children
Exit with returncode 127

@abbradar

Copy link
Copy Markdown
Member Author

@olynch That's because setuid applications don't work in user namespaces, for reasons of security. I don't think there is a simple way around - maybe AppImage supports using user namespaces themselves instead of setuid binaries.

@abbradar

Copy link
Copy Markdown
Member Author

@gnidorah Can you provide some example of how I can test them?

@ghost

ghost commented Jun 28, 2019

Copy link
Copy Markdown

@abbradar Runners icons should not be broken
2019-06-28-185241_grim

@abbradar

abbradar commented Jul 18, 2019 •

Copy link
Copy Markdown
Member Author

I fixed the icons and also generally refactored the package in b0a961e.

Also there's now lutris-free without Steam.

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-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.