-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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: rework #325562
pcsx2: rework #325562
Conversation
@AndersonTorres can we get this merged first, as it's been around for a while? 🙏🏻 |
pkgs/by-name/pc/pcsx2/package.nix
Outdated
repo = "pcsx2"; | ||
fetchSubmodules = true; | ||
rev = "v${finalAttrs.version}"; | ||
sha256 = "sha256-WiwnP5yoBy8bRLUPuCZ7z4nhIzrY8P29KS5ZjErM/A4="; |
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.
sha256 = "sha256-WiwnP5yoBy8bRLUPuCZ7z4nhIzrY8P29KS5ZjErM/A4="; | |
hash = "sha256-WiwnP5yoBy8bRLUPuCZ7z4nhIzrY8P29KS5ZjErM/A4="; |
Oh I can. |
Thanks for pinging me on this one, @AndersonTorres. Possibly my understanding of a package differs from what nixpkgs considers a package. In my mind a package is a piece of software that can be installed, regardless of whether from source or from binary. This PR seems to suggest that nixpkgs differentiates between source builds and binary installs. Can you please point me to documentation that outlines the reasons why such a distinction is made? I'm genuinely curious 🙂 |
I believe, the matter is how packages are referenced by-name, not some conceptual notion of package. https://github.com/NixOS/rfcs/blob/master/rfcs/0140-simple-package-paths.md Two top-level entries, two directories. Is that the issue? |
Yes, let's pick this definition.
The difference is more pronounced. This is a similar situation from vlc vs vlc-bin:
Both packages follow completely distinct methods of deployment: One is binary-only, MacOS-only, can't be customized and merely repacked. Further, it creates an unreasonable coupling. |
Now we have a "small" problem: Darwin users will need to call If this is such a big issue, I can rename pcsx2 to pcsx2-src and green-alias both according to the platform. |
Possibly I'm misguided by my own misconceptions of nixpkgs or general preconceptions or even both 😅 First and foremost as written words can easily misread in their tone: I think separating packages by platform or installation method, i.e. from source or pre-built binary is heading into the right direction, yet there are several things that don't feel right to me about this as it is currently.
I'm very much in favor of the Another approach could be to I don't think I properly understand what you mean by "green-alias", @AndersonTorres, could you provide more context and an example, please? |
The idea is to write something like pcsx2 = if stdenv.isDarwin then pcsx2-bin else pcsx2-src;
Not exactly. The
In Nixpkgs we prefer source-based builds. The upstream binary package would be rejected. The only exception I can imagine is when the binary package has some closed-source extras that are not included by default on the sources.
By design, aliases put in A "green alias" would be one put in all-packages.nix. |
I'm very much for the idea to:
I think this reflects the state of things very well 👌 and look forward to the necessary changes for this in this PR 🙂
That makes sense, after all reproducibility is an important aspect of Nix and nixpkgs. Thanks for the explanation of green aliases, that's helpful to know. |
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 - I'm happy with pcsx2-bin
for Darwin, as it explicitly tells me it's a binary distribution.
Let's "remove" the binary-only, MacOS-only package from this expression, because it should be maintained by MacOS maintainers. Besides, no other modification will be made right now, just a merge between files.
- lacks runHooks on installPhase - remove nested with
- Gather all the sources in a same expression under sources.nix - Doc-comment and rename the patch - strictDeps is set as true - Why extra-cmake-modules does not work in nativeBuildInputs?? - Add myself as maintainer
This is a repack of MacOS-only precompiled package from upstream. Basically it is a migration of the previous Darwin-only package for pcsx2. By request, matteo-pacini is set as the sole maintainer of this package.
Result of 1 package built:
|
Result of |
Description of changes
Merging two packages into one is not a good idea at all. Let's split it.
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.