-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
pcsx2: darwin support, add maintainer #320122
Conversation
0e0c51d
to
02800cf
Compare
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/4127 |
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/4132 |
Result of 1 package built:
|
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.
Nicely done, @matteo-pacini, please find below some hopefully helpful comments for potential future improvement…
pkgs/by-name/pc/pcsx2/darwin.nix
Outdated
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 are your thoughts around adding support to build this package on x86_64-darwin
instead of installing the pre-built binary from upstream?
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.
@afh Imho, It would make this package harder to maintain - I would make it compile from source only if it's supported on both aarch64-darwin
and x86_64-darwin
.
I also expect x86_64-darwin
to slowly lose traction and disappear, so any effort towards that architecture could potentially become a waste of maintainers' time.
This is just my personal opinion, and up to debate: I expect plenty of new Nix adopter to be on aarch64-darwin
, rather than x86_64-darwin
.
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.
It might be worth reconsidering this in light of the upcoming Apple Silicon support?
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.
That makes sense, @matteo-pacini, I'm alright with this being x86_64-darwin
until Apple Silicon supports lands upstream and this can be built from source.
The app requires Rosetta to run, how could this dependency be declared in nixpkgs in general to differentiate between packages that run natively on Apple Silicon and packages needing Rosetta? |
@afh That's a good point - my gut tells me this should only be declared as a @NixOS/darwin-maintainers thoughts on this? |
FYI, upstream is working on natively supporting ARM. |
I agree. There’s nothing about this app that is |
@SuperSamus @afh @emilazy Thanks for the feedback, I'm going to change the derivation and make it natively compile for |
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.
Thanks everyone for chiming in on this, very helpful 🙏
@matteo-pacini please find below updated comments 🙂
pkgs/by-name/pc/pcsx2/package.nix
Outdated
mainProgram = "pcsx2-qt"; | ||
platforms = [ "x86_64-linux" ]; | ||
platforms = [ "x86_64-linux" ] ++ platforms.darwin; |
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.
Given the latest comments as this PR stands now I kindly request the following change:
platforms = [ "x86_64-linux" ] ++ platforms.darwin; | |
platforms = [ "x86_64-linux" "x86_64-darwin" ]; |
pkgs/by-name/pc/pcsx2/darwin.nix
Outdated
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.
That makes sense, @matteo-pacini, I'm alright with this being x86_64-darwin
until Apple Silicon supports lands upstream and this can be built from source.
58a3994
to
456b2ff
Compare
1f8faa2
to
bb341a1
Compare
@emilazy I've encountered a roadblock, the build fails when trying to compile Metal shaders, as that would require host's tools, What's the best / ideal way forward here? Here's four potential approaches:
Pinging also @NixOS/darwin-maintainers, any advice would be greatly appreciated. |
701aa6f
to
02800cf
Compare
@emilazy @afh reverted this PR to its previous state. As stated in #320122 (comment), some thinking is required to bring Metal shaders into the pipeline. I'll bring this topic up on Matrix when I got some time 👍🏻 |
0b6e931
to
b49a0d5
Compare
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.
I agree with you, @matteo-pacini.
Would you be interested in setting up a draft PR for the native darwin build that also tracks the development of Apple silicon in upstream? Might be helpful to get folks together and advise on best paths forward in regards to xcrun and Xcode…
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.
🙂👍
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.
LGTM
Description of changes
linux.nix
anddarwin.nix
darwin.nix
fetches the pre-compiled binaries from GitHubaarch64-darwin
, requires ax86_64-darwin
machinenixfmt-rfc-style
.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.