1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00

* Get rid of $findUnpacker, it's pointless anyway.

* Pass the source file to $unpackCmd via $curSrc.

svn path=/nixpkgs/trunk/; revision=12748
This commit is contained in:
Eelco Dolstra 2008-08-27 15:22:33 +00:00
parent b35469a42e
commit cee9051b7c
3 changed files with 14 additions and 16 deletions

View file

@ -442,34 +442,31 @@ stripHash() {
unpackFile() {
local file="$1"
curSrc="$1"
local cmd
header "unpacking source archive $file" 3
header "unpacking source archive $curSrc" 3
case "$file" in
case "$curSrc" in
*.tar)
tar xvf $file
tar xvf $curSrc
;;
*.tar.gz | *.tgz | *.tar.Z)
gzip -d < $file | tar xvf -
gzip -d < $curSrc | tar xvf -
;;
*.tar.bz2 | *.tbz2)
bzip2 -d < $file | tar xvf -
bzip2 -d < $curSrc | tar xvf -
;;
*.zip)
unzip $file
unzip $curSrc
;;
*)
if test -d "$file"; then
stripHash $file
cp -prvd $file $strippedName
if test -d "$curSrc"; then
stripHash $curSrc
cp -prvd $curSrc $strippedName
else
if test -n "$findUnpacker"; then
$findUnpacker $1;
fi
if test -z "$unpackCmd"; then
echo "source archive $file has unknown type"
echo "source archive $curSrc has unknown type"
exit 1
fi
eval "$unpackCmd"

View file

@ -7,7 +7,7 @@ stdenv.mkDerivation {
md5 = "5e1be9dbde66295821ac7899f2e1f561";
};
unpackCmd = "(mkdir cron && cd cron && sh $src)";
unpackCmd = "(mkdir cron && cd cron && sh $curSrc)";
preBuild = "
substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755

View file

@ -584,7 +584,8 @@ let
};
cron = import ../tools/system/cron {
inherit fetchurl stdenv;
inherit fetchurl;
stdenv = stdenvNew;
};
curl = import ../tools/networking/curl {