aboutsummaryrefslogtreecommitdiff
path: root/pkgs/build-support/fetchurl
diff options
context:
space:
mode:
authorYegor Timoshenko <yegortimoshenko@riseup.net>2018-10-13 16:48:43 +0000
committerYegor Timoshenko <yegortimoshenko@riseup.net>2018-10-16 13:46:19 +0000
commit6fad2ae94bfb9beb2cb9a9f6e32b895de341285e (patch)
treed4422899fa0d7067de04fae1b0f1669e8c373b72 /pkgs/build-support/fetchurl
parent45351e6916ac56a04b633b445e5f42a357d0437e (diff)
fetchurl: warn on rev archives, resolves #32999
Diffstat (limited to 'pkgs/build-support/fetchurl')
-rw-r--r--pkgs/build-support/fetchurl/builder.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/builder.sh b/pkgs/build-support/fetchurl/builder.sh
index f9bc8b602f4c..74fdc320835f 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