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

duckstation: unstable-2023-09-30 -> 0.1-6292 #277565

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

SuperSamus
Copy link
Contributor

Description of changes

Supersedes #273855.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot requested review from AndersonTorres and guibou December 29, 2023 17:27
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Dec 29, 2023
@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 1, 2024
@SuperSamus SuperSamus changed the title duckstation: unstable-2023-09-30 -> unstable-2023-12-19 duckstation: unstable-2023-09-30 -> unstable-2024-01-01 Jan 2, 2024
@delroth delroth removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 2, 2024
Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

Now Wayland support is mandatory?

@SuperSamus
Copy link
Contributor Author

Now Wayland support is mandatory?

I copied upstream:

https://github.com/NixOS/nixpkgs/blob/29972cdbc2ad70c7db8a1abf523c771aa8465f82/pkgs/applications/emulators/duckstation/default.nix#L107-L113

Same thing of PCSX2:

# https://github.com/PCSX2/pcsx2/pull/10200
# Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run
postFixup = ''
source "${makeWrapper}/nix-support/setup-hook"
wrapProgram $out/bin/pcsx2-qt \
--run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi'
'';

I removed enableWayland because having both would be a mess.

@ofborg ofborg bot requested a review from AndersonTorres January 2, 2024 11:04
Copy link
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

Waiting mergers

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 3, 2024
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3204

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1353

@SuperSamus SuperSamus changed the title duckstation: unstable-2023-09-30 -> unstable-2024-01-01 duckstation: unstable-2023-09-30 -> unstable-2024-01-08 Jan 9, 2024
@delroth delroth removed the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 10, 2024
@AndersonTorres
Copy link
Member

Was this yet another mere hash update?
Next time it happens, please do not force-push, just keep the previous commit.

@ofborg ofborg bot requested a review from AndersonTorres January 10, 2024 02:13
@SuperSamus
Copy link
Contributor Author

Is there any reason why this hasn't been merged yet?

@AndersonTorres
Copy link
Member

AndersonTorres commented Jan 14, 2024

Mergers busy merging other things...

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1387

pkgs/applications/emulators/duckstation/default.nix Outdated Show resolved Hide resolved
@SuperSamus SuperSamus changed the title duckstation: unstable-2023-09-30 -> unstable-2024-01-08 duckstation: unstable-2023-09-30 -> 0.1-6283 Jan 17, 2024
];

# https://github.com/stenzek/duckstation/blob/master/scripts/appimage/apprun-hooks/default-to-x11.sh
# Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run
Copy link
Member

Choose a reason for hiding this comment

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

It should be possible to overwrite the makeWrapper used back to the none binary one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doing this would increase startup time, though.
So... which one is less bad? Double wrapping, or longer startup time?
(Also, if I do the latter, it should be changed on PCSX2 too for consistency)

Copy link
Member

Choose a reason for hiding this comment

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

I prefer no double-wrapping.

How much the startup would be affected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #225881.
(Looking at the that... how am I supposed to revert it? Overriding propagatedBuildInputs?)

Copy link
Member

@AndersonTorres AndersonTorres Jan 20, 2024

Choose a reason for hiding this comment

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

The speedup is huge, two orders of magnitude! Let's stay with the double wrapping, until someone writes the Best Wrappers Ever (using JSON or other eerie magic).

Copy link
Member

Choose a reason for hiding this comment

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

Double wrapping is really bad as the program thinks that it was started as .name-wrapped which really is the name of the first wrapper after the other one was applied on top.

Also instead of adding a new magic variable which does things, why can't we tell people to just export QT_QPA_PLATFORM=xcb for duckstation? That would avoid the problem entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, I'll reiterate the points:

  • This wrapping is done to match upstream's behavior. The AppImages have Wayland as an opt-in (and not opt-out) because they think that the Wayland experience on PCSX2/DuckStation isn't good enough for it to be the default. See https://github.com/PCSX2/pcsx2/pull/10179. It is important to respect this when making a package of their program.
  • So, if I have to do the above while not double wrapping, then I need to "revert" write-qt-apps-hook.sh: use make-binary-wrapper for significant speedups #225881's behavior (that is, make wrapQtAppsHook use makeWrapper instead of makeBinaryWrapper). I don't know how to do that.

Also, no one said anything when I did the same thing on PCSX2.

Copy link
Member

Choose a reason for hiding this comment

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

I read the small words.
And, seriously, the "no one said this to me before" is a bad argument, especially in a codebase with sudden changes like Nixpkgs.

Also instead of adding a new magic variable which does things, why can't we tell people to just export QT_QPA_PLATFORM=xcb for duckstation? That would avoid the problem entirely.

I think it would be a serious problem of usability. Yes, we Nixpkgs users are usually a well-informed people, however things like "extra preparation steps" are too much to require, since

  1. Other distros rarely worry about those things
  2. export variables can affect more than the running program, breaking one of the main flagships of Nixpkgs - the sandbox
  3. it is easy to forget to undo the exports, or even why they were made in the first place

Copy link
Member

Choose a reason for hiding this comment

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

Do you consider this thread blocking? Would a simple s/I_WANT_A_BROKEN_WAYLAND_UI/DUCKSTATION_I_WANT_A_BROKEN_WAYLAND_UI/ suffice?

Copy link
Member

Choose a reason for hiding this comment

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

As the maintainer of this package, everything LGTM.

The problems of this expression are external to it.

@SuperSamus SuperSamus changed the title duckstation: unstable-2023-09-30 -> 0.1-6283 duckstation: unstable-2023-09-30 -> 0.1-6292 Feb 14, 2024
@ofborg ofborg bot requested a review from AndersonTorres February 14, 2024 20:11
@pbsds pbsds merged commit 9511a7b into NixOS:master Feb 18, 2024
25 checks passed
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1459

@SuperSamus SuperSamus deleted the duckstation-update branch March 27, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants