nix icon indicating copy to clipboard operation
nix copied to clipboard

fetchTarball regression in nixUnstable?

Open colinxs opened this issue 3 years ago • 7 comments

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.

colinxs avatar May 08 '21 02:05 colinxs

I marked this as stale due to inactivity. → More info

stale[bot] avatar Nov 16 '21 11:11 stale[bot]

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.

cole-h avatar Nov 19 '21 00:11 cole-h

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

nixos-discourse avatar Nov 26 '21 02:11 nixos-discourse

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

nixos-discourse avatar Nov 26 '21 14:11 nixos-discourse

I marked this as stale due to inactivity. → More info

stale[bot] avatar Jul 11 '22 01:07 stale[bot]

Haven't seen this be fixed

yorickvP avatar Jul 11 '22 07:07 yorickvP

Still an issue.

deliciouslytyped avatar Sep 18 '22 03:09 deliciouslytyped

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

2xsaiko avatar Oct 02 '22 09:10 2xsaiko

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

tomberek avatar Nov 21 '23 21:11 tomberek