-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
glfw-wayland-minecraft: update to glfw 3.4 #306264
Conversation
The set-cursor patch is taken from: <Admicos/minecraft-wayland#56> And other changes including fractional scaling is already upstreamed in 3.4 thus not needed anymore.
I mean, it felt like a horrible hack when I was writing it, but you can try upstreaming it, I wouldn't mind |
+1. with edit: using this in the standard |
Pros:
Cons:
Use the patch in the main package but disabled by default is another approach, but it will requires end-users to override and recompile GLFW (though, it does not take too long). |
This is in conflict with #306827, which drops glfw-wayland-minecraft |
{ glfw }: | ||
glfw.overrideAttrs (old: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is generally not a recommended pattern as a user could have something like the following overlay which would cause an infinite recursion:
final: prev: {
glfw = final.glfw-wayland-minecraft
}
What you could do instead is have some kind of common.nix
that you can import and use in both derivations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you could do instead is have some kind of
common.nix
that you can import and use in both derivations.
So do you imply that we should to keep glfw-wayland-minecraft in parallel with the original glfw, rather than making it a package option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I guess making it a package option of the original glfw is also a good way to do this!
Could you add me as a maintainer to the glfw (or common) derivation? I wasn't pinged by ofborg for this PR :( |
Closing in favor of #310073 |
Description of changes
The set-cursor patch is taken from: Admicos/minecraft-wayland#56
And other changes including fractional scaling is already upstreamed in 3.4 thus not needed anymore. I override the patch on the original glfw to de-duplicate the packaging code.
I tested with
prismlauncher.override { withWaylandGLFW = true; }
, Minecraft 1.20.2, Java 17, on KDE 6 wayland session with a 125% scaled display. The game is indeed a native wayland window (checked in KWin debug console), and the cursor setting on opening game GUI (#293296 (comment)) is working correctly instead of crashing like the unpatched glfw.The set-cursor patch itself seems quite reasonable and probably is suitable for upstreaming? CC @DanShaders. Also I'm not sure if it's a good idea to patch unconditionally or conditionally on the glfw package, rather than a separated
glfw-wayland-minecraft
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 馃憤 reaction to pull requests you find important.