Skip to content

duckstation-unofficial: init at 0.1-9483#433242

Closed
ghost wants to merge 2 commits intomasterfrom
unknown repository
Closed

duckstation-unofficial: init at 0.1-9483#433242
ghost wants to merge 2 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Aug 13, 2025

Context:

This PR adds the duckstation-unofficial package attributes which ships the latest version of duckstation under the CC-BY-NC-ND 4.0 which is considered unfree by nixpkgs and thus will not be built by hydra.

My stance on copyright and nixpkgs has changed since I first started contributing as I've started reading more of the community's opinions and my own have developed. My current opinion is that we aren't in violation of any copyright statute by distributing a derivation build script to package duckstation. Upstream simply has no right to forbid the distribution of this derivation nor the right to prevent users from using it. Even if upstream decided to make duckstation closed source and all public links closed, we would still be in our right to distribute a wrapper over the publicly available appimage release.

When launching this package, one is greeted with a warning about using an unofficial build and directs users to the official releases by upstream, this warning can be disabled for subsequent launches.

Whether or not this PR is suitable to be merged, I'm still content with publishing a usable derivation builder for duckstation that people can use out-of-tree if they so wish to.

I've tested running my copy of Crash Bandicoot 1 using a CRT shader on Vulkan.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@ghost ghost force-pushed the init-duckstation-unofficial branch 2 times, most recently from a353c8a to 5b1d853 Compare August 13, 2025 00:17
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 13, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 13, 2025
@ghost ghost marked this pull request as draft August 13, 2025 16:04
@ghost
Copy link
Author

ghost commented Aug 13, 2025

I want to work on adding darwin support (from duckstation-bin) as well as work on an updateScript that updates both derivations and the vendored dependents as well.

@ghost ghost force-pushed the init-duckstation-unofficial branch from 5b1d853 to ea04511 Compare August 13, 2025 22:06
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Aug 13, 2025
@ghost ghost force-pushed the init-duckstation-unofficial branch from ea04511 to 9adbc6f Compare August 13, 2025 22:16
@ghost
Copy link
Author

ghost commented Aug 13, 2025

Removed the git workaround patch, duckstation doesn't require the git variables to be filled in and the only obvious change is that the window title and about dialog don't include the revision.

This allows for removing the deepClone argument and putting all the git related determinism issues to rest.

New Changes:

Added Darwin build (migrated from the earlier duckstation-bin package that was removed in tandem with duckstation) which uses the macos release from GitHub releases. Tested on M1 MBA and application launches correctly.

Added an update script which updates duckstation and all corresponding vendored subpackages.

@ghost ghost marked this pull request as ready for review August 13, 2025 22:20
@ghost ghost requested a review from Sigmanificient August 13, 2025 22:21
@ghost ghost force-pushed the init-duckstation-unofficial branch 3 times, most recently from 18b5372 to a8cb4a9 Compare August 14, 2025 18:12
@ghost
Copy link
Author

ghost commented Aug 14, 2025

Fixed: pname didn't match by-name directory

@ghost ghost force-pushed the init-duckstation-unofficial branch from a8cb4a9 to e2aea78 Compare August 16, 2025 01:24
@ghost
Copy link
Author

ghost commented Aug 16, 2025

I added a new previous commit that enables building shared libraries for the spirv-cross package, this removes the package override needed within duckstation-unofficial.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Aug 16, 2025
@nix-owners nix-owners bot requested a review from Flakebi August 16, 2025 01:30
@ghost
Copy link
Author

ghost commented Aug 16, 2025

Oh wow that causes a huge rebuild on darwin, force pushed to guard it behind a linux host. (didn't work initially because of me changing the postFixup phase, my mistake)

@ghost ghost force-pushed the init-duckstation-unofficial branch 2 times, most recently from 44ce542 to bd09cfc Compare August 16, 2025 01:56
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. labels Aug 16, 2025
Copy link
Member

@keenanweaver keenanweaver left a comment

Choose a reason for hiding this comment

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

From what I can tell, everything is working as intended. All options, cover art downloader, etc.

The only 'issue' I have is it is loading the wrong KDE style/Breeze theme in the file picker. To see it quickly, click System -> Start File.

This package:
Image

Flatpak:
Image

Probably something with my settings, but just wanted to point it out.

nixpkgs-review result for #433242

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 433242

Logs: https://github.com/keenanweaver/nixpkgs-review-gha/actions/runs/17046393147


x86_64-linux

✅ 4 packages built:
  • duckstation-unofficial
  • gpupad
  • spirv-cross
  • taisei

aarch64-linux

✅ 4 packages built:
  • duckstation-unofficial
  • gpupad
  • spirv-cross
  • taisei

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • duckstation-unofficial

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • duckstation-unofficial

@ghost ghost force-pushed the init-duckstation-unofficial branch from bd09cfc to 8646204 Compare August 21, 2025 21:52
@ghost
Copy link
Author

ghost commented Aug 21, 2025

New changes

  • Added https://github.com/duckstation/chtdb as a new subpackage which allows for using cheats and patches within the UI and gets closer to packaging parity with upstream releases.
  • Set PNG icon to 512x512 icon directory instead of erroneously setting it as scalable.
  • Minor inconsistencies removed.

Please test to make sure that cheats/patches do work. I was able to give myself unlimited lives in Crash Bandicoot 1 and the UI reported cheats being loaded in.

@ghost ghost force-pushed the init-duckstation-unofficial branch 3 times, most recently from c797ea9 to 6998783 Compare August 24, 2025 21:18
@Erizur
Copy link

Erizur commented Aug 28, 2025

From what I can tell, everything is working as intended. All options, cover art downloader, etc.

The only 'issue' I have is it is loading the wrong KDE style/Breeze theme in the file picker. To see it quickly, click System -> Start File.

This is also happening to me under KDE 6.4 in nixpkgs-unstable. Other than that, everything else works fine, including cheats and shaders.

@ghost
Copy link
Author

ghost commented Aug 28, 2025

I believe this must be because Duckstation doesn't use portals for its file picker instead either calling the Qt file picker or using the gtk file picker because on GNOME I'm not getting the correct adwaita file picker.

Duckstation will probably never see a full wayland port given the project struggled with it for years now.

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 28, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Aug 29, 2025
@ghost
Copy link
Author

ghost commented Aug 29, 2025

Force pushed and rebased on main

  • duckstation-chtdb: 2025-07-13 -> 2025-08-28

@ghost ghost force-pushed the init-duckstation-unofficial branch from 6998783 to 66fcb37 Compare August 29, 2025 18:36
@ghost ghost force-pushed the init-duckstation-unofficial branch from 66fcb37 to cb8e556 Compare September 12, 2025 03:22
@ghost ghost changed the title duckstation-unofficial: init at 0.1-9384 duckstation-unofficial: init at 0.1-9483 Sep 12, 2025
@ghost
Copy link
Author

ghost commented Sep 12, 2025

I removed both calls to overrideAttrs for soundtouch and discord-rpc since it's #421201 (comment) discouraged within nixpkgs.

I'm still looking into doing the same for shaderc which requires migrating the patches for building the cmake package that was in the vendored source so far I'm getting stuck on CMake errors.

Updated to a newer release of duckstation and also updated sub-packages.

This is a soft-revert of duckstation's removal in #430501 (revision:
f5cb574) and placing it under the
`duckstation-unofficial` attribute which supports both linux and
darwin platforms, most of the previously submitted code and patches
still apply and this commit squashes everything together into one
package file and thus is a combination of work done by different
authors, listed below to the best of my ability:

Co-developed-by: Marcin Serwin <marcin@serwin.dev>
Co-developed-by: Anderson Torres <torres.anderson.85@protonmail.com>
Co-developed-by: OPNA2608 <opna2608@protonmail.com>
Co-developed-by: qubitnano <146656568+qubitnano@users.noreply.github.com>
Co-developed-by: PedroHLC ☭ <root@pedrohlc.com>
Co-developed-by: Artturin <Artturin@artturin.com>
Co-developed-by: Guillaume Bouchard <guillaum.bouchard@gmail.com>
@ghost ghost force-pushed the init-duckstation-unofficial branch from cb8e556 to fdbdc03 Compare September 12, 2025 17:25
@ghost
Copy link
Author

ghost commented Sep 21, 2025

Closing in favor of #444821

@ghost ghost closed this Sep 21, 2025
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants