Skip to content
Snippets Groups Projects
Commit d551062e authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

* Scan for wget and use the full path in fetchurl.sh.

* Use nix-hash (not md5sum) in fetchurl.sh.
parent 236eb592
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,8 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_PATH_PROG(wget, wget)
AC_CHECK_LIB(pthread, pthread_mutex_init)
AM_CONFIG_HEADER([config.h])
......
#! /bin/sh
echo "downloading $url into $out..."
wget "$url" -O "$out" || exit 1
@wget@ "$url" -O "$out" || exit 1
actual=$(md5sum -b $out | cut -c1-32)
actual=$(@bindir@/nix-hash --flat $out)
if ! test "$actual" == "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
......
......@@ -4,5 +4,6 @@
-e s^@bindir\@^$(bindir)^g \
-e s^@sysconfdir\@^$(sysconfdir)^g \
-e s^@localstatedir\@^$(localstatedir)^g \
-e s^@wget\@^$(wget)^g \
< $< > $@ || rm $@
chmod +x $@
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment