fetchFromGitHub: takes passthru and enhance overriding#294329
fetchFromGitHub: takes passthru and enhance overriding#294329ShamrockLee wants to merge 2 commits intoNixOS:masterfrom
passthru and enhance overriding#294329Conversation
|
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/3612 |
66bf99f to
2a28536
Compare
82514db to
3be9877
Compare
|
Since it has two approvals and passes all CI tests, could we merge this PR? #294068 will be ready for review as soon as this PR is merged and goes from master into staging. |
|
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/3842 |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1608 |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1660 |
3be9877 to
77deb59
Compare
77deb59 to
138a39d
Compare
|
I just changed how we improve the
Passing it down to the base fetcher also simplifies the implementation. |
|
@SuperSandro2000 Could you help take another look? |
138a39d to
dcdf4d0
Compare
Take optional argument `passthru` for custom passthru attribute set. Pass the `meta` attribute down to the base builder instead of attaching to the derivation via attribute set updating (`//`). Attach attributes `owner`, `repo`, `rev` and `tags` via `passthru` instead of attribute set update.
dcdf4d0 to
4aff924
Compare
|
parallel effort: #370432 I've yet to read through either PR in full |
|
@ShamrockLee, would this now want to use |
|
|
@philiptaron It turns out to be possible to decide on the base constructor dynamically, given that they are based on the same ancestor constructor. The glitch is that it can only be decided once, i.e., Here's the reasoning: BTW, we need to fix the hideous |
Description of changes
This PR
fetchgitfetchFromGitHubsupportpassthruas an optional argument. This enables user to specifypassthruarguments the idiomatic, non-hacky way. This also make their interface more aligned to that offetchurl.fetchFromGitHubwith<pkg>.overrideAttrsandpassthru.metaattribute of the result package by<pkgs>.overrideAttrsthe one returned by the base fetcher.owner,repoandrevattributes viapassthruinstead of directly updating the attribute set via//, preserving these attributes across<pkg>.overrideAttrs.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.