3
0
Fork 0
forked from mirrors/nixpkgs

Migrate wtk to new "restricted downloads" feature of fetchurl

svn path=/nixpkgs/trunk/; revision=21472
This commit is contained in:
Yury G. Kudryashov 2010-05-01 07:07:25 +00:00
parent 1ae5a63425
commit c43dbd671e
2 changed files with 8 additions and 19 deletions

View file

@ -1,23 +1,8 @@
source $stdenv/setup
if ! test -e "$pathname"; then
echo ""
echo "SORRY!"
echo "You should download \`$(basename $pathname)' from Sun and place it in $(dirname $pathname)."
echo "Blame Sun, not us."
echo ""
exit 1
fi
actual=$(md5sum -b $pathname | cut -c1-32)
if test "$actual" != "$md5"; then
echo "hash is $actual, expected $md5"
exit 1
fi
mkdir unzipped
pushd unzipped
unzip $pathname || true
unzip $src || true
popd
ensureDir $out

View file

@ -2,11 +2,15 @@
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "sun-java-wtk-2.5.2_01";
pathname = "/tmp/sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh";
md5 = "6b70b6e6d426eac121db8a087991589f";
src = fetchurl {
url = meta.homepage;
name = "sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin.sh";
restricted = true;
md5 = "6b70b6e6d426eac121db8a087991589f";
};
builder = ./builder.sh;