about summary refs log tree commit diff
path: root/pkgs/build-support/fetchurl/builder.sh
blob: 8ab2e6df9ed0da375a13c33b33f3f1b2136382d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /bin/sh -e

. $stdenv/setup

header "downloading $out from $url"

curl "$url" > "$out"

actual=$(md5sum -b "$out" | cut -c1-32)
if test "$actual" != "$md5"; then
    echo "hash is $actual, expected $md5"
    exit 1
fi

stopNext