diff --git a/pkgs/stdenv/generic/setup-new.sh b/pkgs/stdenv/generic/setup-new.sh index 2561399695c..b646c3ed7f1 100644 --- a/pkgs/stdenv/generic/setup-new.sh +++ b/pkgs/stdenv/generic/setup-new.sh @@ -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" diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index 4d7dcb93db2..2f7bffcbe31 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2d3c80d2a57..ff35b9b8050 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -584,7 +584,8 @@ let }; cron = import ../tools/system/cron { - inherit fetchurl stdenv; + inherit fetchurl; + stdenv = stdenvNew; }; curl = import ../tools/networking/curl {