support .originalSrc attr as a fallback#324
Merged
ryantm merged 1 commit intonix-community:mainfrom Sep 17, 2022
Merged
Conversation
If a builder creates a sequence of derivations on the way to building a package, nixpkgs-update won't be able to find the correct src attr to query. We can technically use passthru to lie about the src, but src is load-bearing and this may mislead or confuse humans (or other tools?) later. This also checks an originalSrc fallback attr that isn't load-bearing.
Collaborator
|
@abathur This is deployed now. |
abathur
added a commit
to abathur/nixpkgs
that referenced
this pull request
Sep 17, 2022
Effort to fix automatic nixpkgs-update updates for resholved packages in 9f6310d did help the bot get further, but it then failed to find the source outputHash (the outer derivation's source is the inner derivation; bot looks for outer.src.outputHash; ours is at outer.src.src.outputHash). This change uses `originalSrc` to indicate the source of the inner derivation. Along with nix-community/nixpkgs-update#324, this enables the bot to fall back on an attr that Nix/nixpkgs are not directly depending on, supporting automatic updates for packages built with `resholve.mkDerivation`.
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If a builder creates a sequence of derivations on the way to building a package, nixpkgs-update won't be able to find the
correct
srcattr to query. We can technically usepassthruto lie about thesrc, butsrcis load-bearing and this maymislead or confuse humans (or other tools?) later.
This change checks an
originalSrcfallback attr that isn't load-bearing within builds or nixpkgs.before
after (still fails, but for package reasons!)
If I can get a little guidance on where they should be documented and whether you'd like them in one or multiple PRs, I'd also like to follow up with one or more PRs to at least partially document:
upstreamremote that has been fetched