* curl: build with OpenSSL (https) support by default.

* Some fetchurl-related refactoring.  The `realCurl' attribute is
  gone, `curl' is the real thing.  To prevent an infinite recursion in
  `fetchurl' (because it depends on curl and building curl needs
  fetchurl), curl and its dependencies (openssl, zlib, perl) use
  `fetchurlBoot', which is the fetchurl used by the previous bootstrap
  phase (e.g. the statically linked version of curl for
  stdenv-linux).  So as a result you can use https:// urls almost
  everywhere.

  There's also some hackery to prevent a different curl from being
  built in every stdenv-linux bootstrap phase (namely the
  stdenv.fetchurl attribute which allows fetchurl to be overriden
  everywhere).

svn path=/nixpkgs/trunk/; revision=11905
This commit is contained in:
Eelco Dolstra
2008-05-27 07:49:55 +00:00
parent 2ead4b20b5
commit e21b6b6ee5
10 changed files with 58 additions and 29 deletions
+13 -7
View File
@@ -99,8 +99,13 @@ rec {
# the bootstrap.
stdenvBootFun =
{gcc, staticGlibc, extraAttrs ? {}}:
import ../generic {
let
fetchurlBoot = import ../../build-support/fetchurl {
stdenv = stdenvInitial;
inherit curl;
};
in import ../generic {
name = "stdenv-linux-boot";
param1 = if staticGlibc then "static" else "dynamic";
preHook = ./scripts/prehook.sh;
@@ -109,7 +114,9 @@ rec {
initialPath = [
staticTools
];
inherit gcc extraAttrs;
inherit fetchurlBoot;
extraAttrs = extraAttrs // {fetchurl = fetchurlBoot;};
inherit gcc;
};
@@ -120,7 +127,6 @@ rec {
# Use the statically linked, downloaded glibc/gcc/binutils.
gcc = wrapGCC {libc = staticGlibc; binutils = staticBinutils;};
staticGlibc = true;
extraAttrs = {inherit curl;};
};
@@ -143,7 +149,7 @@ rec {
stdenvLinuxBoot2 = removeAttrs (stdenvBootFun {
staticGlibc = false;
gcc = wrapGCC {binutils = staticBinutils; libc = stdenvLinuxGlibc;};
extraAttrs = {inherit curl; glibc = stdenvLinuxGlibc;};
extraAttrs = {glibc = stdenvLinuxGlibc;};
}) ["gcc" "binutils"];
@@ -164,7 +170,6 @@ rec {
libc = stdenvLinuxGlibc;
gcc = stdenvLinuxBoot2Pkgs.gcc.gcc;
};
extraAttrs = {inherit curl;};
};
@@ -197,8 +202,9 @@ rec {
shell = stdenvLinuxBoot3Pkgs.bash + "/bin/sh";
fetchurlBoot = stdenvLinuxBoot3.fetchurlBoot;
extraAttrs = {
curl = stdenvLinuxBoot3Pkgs.realCurl;
inherit (stdenvLinuxBoot2Pkgs) binutils /* gcc */ glibc;
inherit (stdenvLinuxBoot3Pkgs)
gzip bzip2 bash coreutils diffutils findutils gawk