1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

Merge #19960: fetchfile: remove

vcunat: it is unused, and it would better be implemented via a
fixed-output derivation instead of manually checking the hash
(if someone actually needed this).
This commit is contained in:
Vladimír Čunát 2016-10-29 14:08:04 +02:00
commit d298b5ed26
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 0 additions and 22 deletions

View file

@ -1,11 +0,0 @@
source $stdenv/setup
echo "copying $pathname into $out..."
cp "$pathname" "$out" || exit 1
actual=$(md5sum -b $out | cut -c1-32)
if test "$actual" != "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
fi

View file

@ -1,11 +0,0 @@
{stdenv}: {pathname, md5 ? "", sha256 ? ""}: stdenv.mkDerivation {
name = baseNameOf (toString pathname);
builder = ./builder.sh;
pathname = pathname;
} // if (sha256 == "") then {
md5 = (stdenv.lib.fetchMD5warn "fetchfile" pathname md5);
id = md5;
} else {
sha256 = sha256;
id = sha256;
}