-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Packaging: support for patching the nix
package
#12472
Comments
TBH if there is an I do like #6507 of course, but I also think we should expose the individual non-test libraries at least as separate packages because IMO they really are separate packages. (OTOH, main lib vs building tests vs running tests is definitely classic #6507 :)) |
They already are separate packages, but they reside in a "passthru". Whether a package set has a Maybe we should do the simple thing first and have a |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/overriding-the-nix-2-26-componentized-build/60428/2 |
I keep wondering if all the complexity for nixpkgs is actually worth it for being able to re-use the same nix expression across the nix flake and nixpkgs. |
Componentized builds in the repo are very beneficial for performance reasons. The time investment into these expressions is in my opinion worth it, because of related efforts, such as
Those are all about organizing packages and derivations, and those efforts cross-pollinate. |
Takeaways from #12503:
|
@Mic92 IMO it's good for us to dogfood a bit on the larger question of
When we were really niche, this was a non-issue. But as we get more popular, it will come up more and more. I doubt we've settled on a final design --- it does feel quite complex today. But over time we'll work on the division of labor and abstractions between us and Nixpkgs, and I think we'll get better. |
Is your feature request related to a problem?
This is about how Nix itself is packaged with Nix.
Since the packaging now consists of multiple derivations that share a single source (Nixpkgs) or portions of it (flake), it is now next to impossible to override the source or provide a patch.
Proposed solution
Add patching logic to
everything.nix
. Upstream it into Nixpkgs too.Alternative solutions
Only do it in Nixpkgs. It is easier there because it has a single
src
.I find this unsatisfactory because these packages should be drop-in replacements. Otherwise users will run into unnecessary issues when switching between Nixpkgs and the flake.
Additional context
I'd really want package-local non-derivation variables for this.
mkPackage
nixpkgs#296769The
components.nix
/dependencies.nix
scope(s) and theeverything.nix
package should be declared in the same fixpoint to avoid fixpoint hell.Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: