* 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:
parent
b35469a42e
commit
cee9051b7c
@ -442,34 +442,31 @@ stripHash() {
|
|||||||
|
|
||||||
|
|
||||||
unpackFile() {
|
unpackFile() {
|
||||||
local file="$1"
|
curSrc="$1"
|
||||||
local cmd
|
local cmd
|
||||||
|
|
||||||
header "unpacking source archive $file" 3
|
header "unpacking source archive $curSrc" 3
|
||||||
|
|
||||||
case "$file" in
|
case "$curSrc" in
|
||||||
*.tar)
|
*.tar)
|
||||||
tar xvf $file
|
tar xvf $curSrc
|
||||||
;;
|
;;
|
||||||
*.tar.gz | *.tgz | *.tar.Z)
|
*.tar.gz | *.tgz | *.tar.Z)
|
||||||
gzip -d < $file | tar xvf -
|
gzip -d < $curSrc | tar xvf -
|
||||||
;;
|
;;
|
||||||
*.tar.bz2 | *.tbz2)
|
*.tar.bz2 | *.tbz2)
|
||||||
bzip2 -d < $file | tar xvf -
|
bzip2 -d < $curSrc | tar xvf -
|
||||||
;;
|
;;
|
||||||
*.zip)
|
*.zip)
|
||||||
unzip $file
|
unzip $curSrc
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if test -d "$file"; then
|
if test -d "$curSrc"; then
|
||||||
stripHash $file
|
stripHash $curSrc
|
||||||
cp -prvd $file $strippedName
|
cp -prvd $curSrc $strippedName
|
||||||
else
|
else
|
||||||
if test -n "$findUnpacker"; then
|
|
||||||
$findUnpacker $1;
|
|
||||||
fi
|
|
||||||
if test -z "$unpackCmd"; then
|
if test -z "$unpackCmd"; then
|
||||||
echo "source archive $file has unknown type"
|
echo "source archive $curSrc has unknown type"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
eval "$unpackCmd"
|
eval "$unpackCmd"
|
||||||
|
@ -7,7 +7,7 @@ stdenv.mkDerivation {
|
|||||||
md5 = "5e1be9dbde66295821ac7899f2e1f561";
|
md5 = "5e1be9dbde66295821ac7899f2e1f561";
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackCmd = "(mkdir cron && cd cron && sh $src)";
|
unpackCmd = "(mkdir cron && cd cron && sh $curSrc)";
|
||||||
|
|
||||||
preBuild = "
|
preBuild = "
|
||||||
substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755
|
substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755
|
||||||
|
@ -584,7 +584,8 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
cron = import ../tools/system/cron {
|
cron = import ../tools/system/cron {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl;
|
||||||
|
stdenv = stdenvNew;
|
||||||
};
|
};
|
||||||
|
|
||||||
curl = import ../tools/networking/curl {
|
curl = import ../tools/networking/curl {
|
||||||
|
Loading…
Reference in New Issue
Block a user