nix
nix copied to clipboard
fetchTarball regression in nixUnstable?
Describe the bug
builtins.fetchTarball
no longer works if there is more than one top level directory in a tarball.
Steps To Reproduce
Welcome to Nix version 2.4pre20210503_6d2553a. Type :? for help.
nix-repl> builtins.fetchTarball {url="https://pkg.julialang.org/artifact/c91b35452c8fa91e8ac43993a2bc8fb4f78476bb";}
error: tarball 'https://pkg.julialang.org/artifact/c91b35452c8fa91e8ac43993a2bc8fb4f78476bb' contains an unexpected number of top-level files
Welcome to Nix version 2.3.10. Type :? for help.
nix-repl> builtins.fetchTarball {url="https://pkg.julialang.org/artifact/c91b35452c8fa91e8
ac43993a2bc8fb4f78476bb";}
"/nix/store/jwm4hzafk0yy31bysgw51vhknvvgh4an-source"
Expected behavior
A clear and concise description of what you expected to happen.
nix-env --version
output
Additional context
Add any other context about the problem here.
I marked this as stale due to inactivity. → More info
Not stale -- someone just came across this in the Nix / NixOS matrix.
@edolstra: is there a reason why Nix expects only one top-level file in tarballs? This was introduced in https://github.com/NixOS/nix/commit/8918bae09828133259acb36d6aef60ffbfad252c.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-2-4-and-what-s-next/16257/1
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/nix-2-4-and-what-s-next/16257/8
I marked this as stale due to inactivity. → More info
Haven't seen this be fixed
Still an issue.
Did this actually ever work? Blame shows it as introduced with https://github.com/NixOS/nix/commit/462421d34588c227eb736b07f7b40a38aa0972a6, and before https://github.com/NixOS/nix/commit/8918bae09828133259acb36d6aef60ffbfad252c.
Related: #7083
Docs say
The top-level path component of the files in the tarball is removed, so it is best if the tarball contains a single directory at top level.
which implies a single top-level dir is "best", but it a bit confusing.
needs decision
- [ ] WONT FIX : behavior is as desired
- [ ] BUG: the regression should be resolved
Fixed By: https://github.com/NixOS/nix/pull/9053