Skip to content

nix-prefetch-url seems to uncompress archive if content-encode: gzip is set #10254

Closed

Description

Describe the bug

nix-prefetch-url is downloading and uncompresing the file sometimes. this appears to happen if the download is uses gzip content encoding. when content-encode: gzip is not set (and thus the download not doubly compressed) nix-prefetch-url works as expected.

Steps To Reproduce

nix-prefetch-url --print-path https://releases.warp.dev/stable/v0.2024.03.12.08.02.stable_01/warp-terminal-v0.2024.03.12.08.02.stable_01-1-x86_64.pkg.tar.zst
0gwji3934p4c0qmfyirjwyg7dy1rhdlyrvj2x2c2xwllpxd89pw9
/nix/store/biisn805rah1s25smdzpcd4hxqm0vpw3-warp-terminal-v0.2024.03.12.08.02.stable_01-1-x86_64.pkg.tar.zst
$ file /nix/store/biisn805rah1s25smdzpcd4hxqm0vpw3-warp-terminal-v0.2024.03.12.08.02.stable_01-1-x86_64.pkg.tar.zst
/nix/store/biisn805rah1s25smdzpcd4hxqm0vpw3-warp-terminal-v0.2024.03.12.08.02.stable_01-1-x86_64.pkg.tar.zst: POSIX tar archive

expect that the file is zstd compressed.

Expected behavior

expect that the downloaded file is compressed and the hash is calculated against the compressed file.

Additional context
NixOS/nixpkgs#295553 (comment)

tried versions nix-prefetch-url (Nix) 2.19.3 and nix-prefetch-url (Nix) 2.17.1 and get same results. also happens on the setup used by r-ryantm.

Priorities

Add 👍 to issues you find important.

Activity

  1. ghost added on Mar 16, 2024
  2. thufschmitt commented on Apr 3, 2024

    @thufschmitt
    Member

    Should be fixed by #10341. Feel free to reopen if it's not the case

  3. moved this from To triage to Done in Nix teamon Apr 3, 2024
  4. nixos-discourse commented on Apr 8, 2024

    @nixos-discourse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions