* A function `useDietLibC' that returns a modified stdenv that uses

dietlibc to produce small, statically linked binaries.  This stdenv
  also passes `-Os' to GCC automatically to optimise for size.  It
  also tries to prevent builders from linking against dynamic
  libraries (which dietlibc doesn't support).

* A function `addAttrsToDerivation' that returns a modified stdenv
  that always adds the specified attributes to the derivations that it
  produces.  Example (from curl):

    curlDiet =  import ../tools/networking/curl {
      inherit fetchurl zlib;
      stdenv = addAttrsToDerivation {
        CFLAGS = "-DHAVE_INET_NTOA_R_2_ARGS=1";
      } (useDietLibC stdenv);
    };

  (This is needed to get curl to build with dietlibc.  Also note the
  stacking of stdenv-modifying functions.)

* curl-diet: no longer necessary.

svn path=/nixpkgs/trunk/; revision=6761
This commit is contained in:
Eelco Dolstra
2006-10-18 12:50:04 +00:00
parent 20d42ae673
commit 501ceef268
7 changed files with 33 additions and 79 deletions
-9
View File
@@ -1,9 +0,0 @@
source $stdenv/setup
if test "$sslSupport"; then
configureFlags="--with-ssl=$openssl"
else
configureFlags="--without-ssl"
fi
genericBuild
+3 -1
View File
@@ -4,12 +4,14 @@ assert sslSupport -> openssl != null;
stdenv.mkDerivation {
name = "curl-7.15.5";
builder = ./builder.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/curl-7.15.5.tar.bz2;
md5 = "594142c7d53bbdd988e8cef6354eeeff";
};
buildInputs = [zlib (if sslSupport then openssl else null)];
patches = [./configure-cxxcpp.patch];
configureFlags = "
${if sslSupport then "--with-ssl=${openssl}" else "--without-ssl"}
";
inherit sslSupport openssl;
}