diff options
author | Yegor Timoshenko <yegortimoshenko@riseup.net> | 2018-10-13 16:48:43 +0000 |
---|---|---|
committer | Yegor Timoshenko <yegortimoshenko@riseup.net> | 2018-10-16 13:46:19 +0000 |
commit | 6fad2ae94bfb9beb2cb9a9f6e32b895de341285e (patch) | |
tree | d4422899fa0d7067de04fae1b0f1669e8c373b72 /pkgs/build-support/fetchurl | |
parent | 45351e6916ac56a04b633b445e5f42a357d0437e (diff) | |
download | nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar.gz nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar.bz2 nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar.lz nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar.xz nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.tar.zst nixpkgs-6fad2ae94bfb9beb2cb9a9f6e32b895de341285e.zip |
fetchurl: warn on rev archives, resolves #32999
Diffstat (limited to 'pkgs/build-support/fetchurl')
-rw-r--r-- | pkgs/build-support/fetchurl/builder.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/builder.sh b/pkgs/build-support/fetchurl/builder.sh index f9bc8b602f4..74fdc320835 100644 --- a/pkgs/build-support/fetchurl/builder.sh +++ b/pkgs/build-support/fetchurl/builder.sh @@ -118,7 +118,6 @@ if test -n "$showURLs"; then exit 0 fi - if test -n "$preferHashedMirrors"; then tryHashedMirrors fi @@ -128,6 +127,16 @@ set -o noglob success= for url in $urls; do + if [ -z "$postFetch" ]; then + case "$url" in + https://github.com/*/archive/*) + echo "warning: archives from GitHub revisions should use fetchFromGitHub" + ;; + https://gitlab.com/*/-/archive/*) + echo "warning: archives from GitLab revisions should use fetchFromGitLab" + ;; + esac + fi tryDownload "$url" if test -n "$success"; then finish; fi done |