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
fetchurl: strip query from filename #107515
Conversation
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.
Nice!
4464ebb
to
1410bc0
Compare
Please target staging. |
5f6ced2
to
a567b92
Compare
I just wrote the related NixOS/rfcs#84, where I intentionally pointed out that all fetchers should use the same I think let's first see where the discussion in NixOS/rfcs#84 goes, because depending on that, this PR might not be necessary, or this PR's behavior could also be applied to all other URL fetchers. |
I marked this as stale due to inactivity. → More info |
@holymonson Do you think we can close this PR? |
Motivation for this change
When fetching url like https://bug-220081-attachments.webkit.org/attachment.cgi?id=416707&action=diff&format=raw , the filename contains query separator
&
which is invalid as path name in Nix. In fact, since it's not part of path according to URI syntax, we can simply strip the whole query component.Things done
Manually
fetchpatch
the patch mention above and it works.sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)