diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-04-08 00:17:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-08 00:17:24 +0000 |
commit | 8d1d992273105aa114f52ae7156a26886b581fca (patch) | |
tree | 9d13de998017da48cdd5582c5869490d74da1815 /pkgs/build-support | |
parent | 6e4d5726025ecda5a10dbf3f6db4300316f95a49 (diff) | |
parent | d70959a2e266910cc4aff90a449fd6d5fbf1e334 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/fetchzip/default.nix | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix index b00983772e4ba..cde4d4f579f4e 100644 --- a/pkgs/build-support/fetchzip/default.nix +++ b/pkgs/build-support/fetchzip/default.nix @@ -5,16 +5,19 @@ # (e.g. due to minor changes in the compression algorithm, or changes # in timestamps). -{ fetchurl, unzip }: +{ lib, fetchurl, unzip }: { # Optionally move the contents of the unpacked tree up one level. stripRoot ? true -, url +, url ? "" +, urls ? [] , extraPostFetch ? "" , name ? "source" , ... } @ args: -(fetchurl ({ +(fetchurl (let + basename = baseNameOf (if url != "" then url else builtins.head urls); +in { inherit name; recursiveHash = true; @@ -27,7 +30,7 @@ mkdir "$unpackDir" cd "$unpackDir" - renamed="$TMPDIR/${baseNameOf url}" + renamed="$TMPDIR/${basename}" mv "$downloadedFile" "$renamed" unpackFile "$renamed" '' |