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

umu -> umu-launcher: switch to npins & rename to umu-launcher #233

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

LovingMelody
Copy link
Contributor

This pull request resolves issue #204. Following the upstream renaming of umu to umu-launcher, I have updated the name accordingly. If you prefer this change to be implemented as a soft change for now, please let me know.

Mentioning @ProspectPyxis since this also changes osu-stable. I did a quick test to ensure it's working.

@LovingMelody
Copy link
Contributor Author

Thanks to Open-Wine-Components/umu-launcher#345 we don't need submodules, even though pyzstd isn't in nixpkgs yet.
Note: this flake's package definitions are dependent on a flake input because of this line, so I have implemented an alternative.

Copy link
Owner

@fufexan fufexan left a comment

Choose a reason for hiding this comment

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

LGTM

Isn't umu-launcher also in Nixpkgs? Or does it not include all the upstream changes yet?

@LovingMelody
Copy link
Contributor Author

LovingMelody commented Feb 1, 2025

It's in nixpkgs, but what's currently being used by users is not yet upstreamed (a release hasn't been pushed with it). I don't know how I feel about rolling back versions

@fufexan
Copy link
Owner

fufexan commented Feb 1, 2025

Thought so. Then this is fine. We'll use the nixpkgs package later, when it's up to date.

Will wait for @ProspectPyxis to confirm osu-stable is working.

@clemenscodes
Copy link

I was having issues updating my flake due to this error:

error:
       … while fetching the input 'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=7a71163b79e56222fe3f3097d1e71208a91a1a3b&submodules=1'

       error: Cannot find Git revision '7a71163b79e56222fe3f3097d1e71208a91a1a3b' in ref 'refs/heads/main' of repository 'https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix'! Please make sure that the rev exists on the ref you've specified or add allRefs = true; to fetchGit.

Overriding the input using

nix flake update --override-input nix-gaming github:LovingMelody/nix-gaming/update-umu-launcher

fixed the issue above. Thanks!

@LovingMelody LovingMelody force-pushed the update-umu-launcher branch 2 times, most recently from 2ad9768 to 4ecd309 Compare February 4, 2025 20:20
* Rename `umu` to `umu-launcher` to match package name upstream

* Remove flake input for `umu-launcher` and use npins instead
@fufexan
Copy link
Owner

fufexan commented Feb 4, 2025

I've tried to test osu-stable, but umu is having a hard time finding the right 32-bit GL drivers, and gives the errors below.

Errors
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/mihai/.drirc: No such file or directory.
libGL: using driver amdgpu for 83
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/mihai/.drirc: No such file or directory.
libGL: pci id for fd 83: 1002:1638, driver radeonsi
libGL: MESA-LOADER: failed to open /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: wrong ELF class: ELFCLASS64
libGL error: MESA-LOADER: failed to open radeonsi: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: wrong ELF class: ELFCLASS64 (search paths /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: radeonsi
libGL: MESA-LOADER: failed to open /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/swrast_dri.so: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/swrast_dri.so: wrong ELF class: ELFCLASS64
libGL error: MESA-LOADER: failed to open swrast: /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri/swrast_dri.so: wrong ELF class: ELFCLASS64 (search paths /usr/lib/pressure-vessel/overrides/lib/x86_64-linux-gnu/dri)
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  551
  Current serial number in output stream:  550

I've looked into this and it had been fixed previously, but this has changed since @MattSturgeon's rewrite.

By looking at the changes in Nixpkgs and upstream, I've worked out two possible options, none of which worked:

diff --git a/pkgs/default.nix b/pkgs/default.nix
index 3b5889a..8994476 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -77,7 +77,13 @@
       };
 
       osu-stable = pkgs.callPackage ./osu-stable {
-        inherit (config.packages) osu-mime proton-osu-bin umu-launcher;
+        inherit (config.packages) osu-mime proton-osu-bin;
+        # Add 32-bit drivers
+        umu-launcher = config.packages.umu-launcher.override {
+          # see https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/hardware/graphics.nix#L124
+          extraLibraries = p: [p.mesa.drivers];
+        };
         wine = config.packages.wine-osu;
         wine-discord-ipc-bridge = config.packages.wine-discord-ipc-bridge.override {wine = config.packages.wine-osu;};
       };
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 3b5889a..8994476 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -77,7 +77,13 @@
       };
 
       osu-stable = pkgs.callPackage ./osu-stable {
-        inherit (config.packages) osu-mime proton-osu-bin umu-launcher;
+        inherit (config.packages) osu-mime proton-osu-bin;
+        # Add 32-bit drivers
+        umu-launcher = config.packages.umu-launcher.overrideAttrs (_: {
+          # see https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/hardware/graphics.nix#L124
+          # extraLibraries = p: [p.mesa.drivers];
+          multiArch = true;
+        });
         wine = config.packages.wine-osu;
         wine-discord-ipc-bridge = config.packages.wine-discord-ipc-bridge.override {wine = config.packages.wine-osu;};
       };

Any ideas on how to fix this would be appreciated.

@MattSturgeon
Copy link

MattSturgeon commented Feb 4, 2025

I've tried to test osu-stable, but umu is having a hard time finding the right 32-bit GL drivers, and gives the errors below.
Errors

It'd be better to discuss this in an issue on https://github.com/NixOS/nixpkgs and/or https://github.com/Open-Wine-Components/umu-launcher, as it isn't strictly related to this PR.

Unless this PR is also bumping the umu repo from a pre-refactor revision to a post-refactor revision? EDIT: it's not. The previous flake lock was pointing to the same commit used by this PR.

I've looked into this and it had been fixed previously, but this has changed since @MattSturgeon's rewrite.

If that linked commit was the fix, then adding multiArch = true to the nixpkgs package should be sufficient. Currently it is not specified: https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/um/umu-launcher/package.nix

Unfortunately buildFHSEnv packages aren't very overridable, so this is probably something that needs to be fixed in nixpkgs; I don't think there's a way to solve it via an override in the mean time.

EDIT: NixOS/nixpkgs#379425 (merged)

@LovingMelody
Copy link
Contributor Author

Weird, I am not having the issue on Nvidia.

my only guess on how to fix it, pass

with config.hardware.graphics; [ package package32 ];

@ProspectPyxis
Copy link
Contributor

Apologies for the delay - I didn't have access to my computer for a bit.

I'm currently running into the same issue as MattSturgeon, which should be fixed when the PR is in unstable. There shouldn't be any other issues as far as I can tell.

@fufexan
Copy link
Owner

fufexan commented Feb 5, 2025

If you want to test, you can override the nixpkgs input to Matt's branch and it should work as-is.

Also, linking the tracker so we can merge this ASAP. https://nixpk.gs/pr-tracker.html?pr=379425

@MattSturgeon
Copy link

Also, linking the tracker so we can merge this ASAP. https://nixpk.gs/pr-tracker.html?pr=379425

Technically, that PR shouldn't block this one, because nix-gaming is already using a umu-launcher revision affected by the issue, right? So this PR shouldn't make the situation any worse than it already is.

Also: nix-gaming is tracking nixpkgs-unstable, which already has the fix. Currently, the only unstable channel without the fix is nixos-unstable.

So if the flake.lock is bumped again, this PR should also bring in that upstream fix (assuming end users aren't defining a follows).

@fufexan
Copy link
Owner

fufexan commented Feb 5, 2025

Correct. The readme instructs users not to use any follows in order to benefit from the binary cache, but it's not a hard requirement.

Alright then, I'll merge this and let CI update things.

Copy link
Owner

@fufexan fufexan left a comment

Choose a reason for hiding this comment

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

LGTM, thanks everyone!

@fufexan fufexan merged commit 3030553 into fufexan:master Feb 5, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants