-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fetchGit
with a rev is pure, but not available in restricted mode without a sha
#3469
Comments
iirc you can use rev as a reference to a tag, which can be force pushed. |
I'd have expected you'd need to use |
And if that's the case, then it shouldn't be considered pure either. |
If that's the case we can fetch the commit as usual and check that the commit hash equals |
@michaelpj I can't reproduce. This works:
BTW I'm thinking about removing |
Sorry, I should have clarified, this is without |
WRT getting rid of |
I marked this as stale due to inactivity. → More info |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/how-do-language-tools-that-use-import-from-derivation-ifd-work/14003/2 |
While conceptually the premise of this issue is correct, the current implementation is not actually reproducible because of the bad git clean/smudge filter handling. See #4635 for a partial fix. |
I marked this as stale due to inactivity. → More info |
builtins.fetchGit
is considered to be a pure derivation when it has a revision. But counterintutively (to me at least), it is not available in restricted mode unless it also has a sha, making it a fixed-output derivation (or you put the URL inallowed-uris
).This doesn't make much sense to me. As I understand it, the point of restricted mode is to prevent Hydra from fetching arbitrary things from the network. But we allow this for fixed-output derivations, where the output is pinned down. Why not for
fetchGit
, where the output is pinned down by a rev?The text was updated successfully, but these errors were encountered: