-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
UXThe way in which users interact with Nix. Higher level than UI.The way in which users interact with Nix. Higher level than UI.cliThe old and/or new command line interfaceThe old and/or new command line interface
Description
When the argument to fetchurl defines executable = true, then outputModeHash gets set to "recursive". This causes nix-prefetch-url to want to unpack the downloaded file. Other tools, like nix-build, aren't affected by this issue.
Example
Lets assume we add/overlay following package:
{ fetchurl }:
fetchurl {
url = "https://nixos.org/releases/nix/nix-1.11.13/manual.pdf";
sha256 = "0g8pdb900b3mbq3wxy855qfwggcq6njv48g9fiq0jikbnbdmgclv";
executable = true;
} Prefetching it will then fail as follows:
$ nix-prefetch-url -A pkgs.derp
downloading ‘https://nixos.org/releases/nix/nix-1.11.13/manual.pdf’... [0/0 KiB, 0.0 KiB/s]
unpacking...
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
error: program ‘tar’ failed with exit code 2With executable = true removed, everything works as expected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
UXThe way in which users interact with Nix. Higher level than UI.The way in which users interact with Nix. Higher level than UI.cliThe old and/or new command line interfaceThe old and/or new command line interface