Skip to content

Commit

Permalink
fetchurl: drop vendored fetchurl.nix
Browse files Browse the repository at this point in the history
This commit assumes that NixOS/nix#7052 merges.  If it
has not yet merged and you did not cherry-pick it into your copy of Nix, revert
this commit before testing.
  • Loading branch information
Adam Joseph committed Sep 16, 2022
1 parent b69ff34 commit 30a099f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 47 deletions.
7 changes: 4 additions & 3 deletions pkgs/build-support/fetchurl/boot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ let mirrors = import ./mirrors.nix; in
, sha256 ? ""
, hash ? ""
, name ? baseNameOf (toString url)
, __impure ? false
, postFetch ? null
}@args:

Expand All @@ -17,8 +18,8 @@ assert hash != "" -> sha256 == "";
assert sha256 != "" -> hash == "";

if postFetch==null
then import ./nix-fetchurl.nix {
inherit system hash sha256 name;
then import <nix/fetchurl.nix> {
inherit system hash sha256 name __impure;

url =
# Handle mirror:// URIs. Since <nix/fetchurl.nix> currently
Expand All @@ -32,7 +33,7 @@ else stdenv.mkDerivation {
srcs = [ ];
unpackPhase = ''
runHook preUnpack
cp '${fetchurl (args // { postFetch=null; hash=""; sha256=""; })}' $out
cp '${fetchurl (args // { postFetch=null; hash=""; sha256=""; __impure=true; })}' $out
chmod +w $out
runHook postUnpack
'';
Expand Down
44 changes: 0 additions & 44 deletions pkgs/build-support/fetchurl/nix-fetchurl.nix

This file was deleted.

0 comments on commit 30a099f

Please sign in to comment.