Author: rob
Date: Wed May  4 10:03:46 2011
New Revision: 27132
URL: https://svn.nixos.org/websvn/nix/?rev=27132&sc=1

Log:
add some versions of cppunit/boost/protobuf, added binutils with gold, added 
nlopt

Added:
   nixpkgs/trunk/pkgs/development/libraries/boost/1.42.nix
   nixpkgs/trunk/pkgs/development/libraries/protobuf/2.2.0.nix
Modified:
   nixpkgs/trunk/pkgs/development/tools/misc/binutils/default.nix
   nixpkgs/trunk/pkgs/top-level/all-packages.nix

Added: nixpkgs/trunk/pkgs/development/libraries/boost/1.42.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/boost/1.42.nix     Wed May  4 
10:03:46 2011        (r27132)
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
+, enableRelease ? true
+, enableDebug ? false
+, enableSingleThreaded ? false
+, enableMultiThreaded ? true
+, enableShared ? true
+, enableStatic ? false
+, enablePIC ? false
+}:
+
+let
+
+  variant = stdenv.lib.concatStringsSep ","
+    (stdenv.lib.optional enableRelease "release" ++
+     stdenv.lib.optional enableDebug "debug");
+
+  threading = stdenv.lib.concatStringsSep ","
+    (stdenv.lib.optional enableSingleThreaded "single" ++
+     stdenv.lib.optional enableMultiThreaded "multi");
+
+  link = stdenv.lib.concatStringsSep ","
+    (stdenv.lib.optional enableShared "shared" ++
+     stdenv.lib.optional enableStatic "static");
+
+  # To avoid library name collisions
+  finalLayout = if ((enableRelease && enableDebug) ||
+    (enableSingleThreaded && enableMultiThreaded) ||
+    (enableShared && enableStatic)) then
+    "tagged" else "system";
+
+  cflags = if (enablePIC) then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" 
else "";
+
+in
+
+stdenv.mkDerivation {
+  name = "boost-1.42.0";
+
+  meta = {
+    homepage = "http://boost.org/";;
+    description = "Boost C++ Library Collection";
+    license = "boost-license";
+
+    maintainers = [ stdenv.lib.maintainers.simons ];
+  };
+
+  src = fetchurl {
+    url = "mirror://sourceforge/boost/boost_1_42_0.tar.bz2";
+    sha256 = "02g6m6f7m11ig93p5sx7sfq75c15y9kn2pa3csn1bkjhs9dvj7jb";
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [icu expat zlib bzip2 python];
+
+  configureScript = "./bootstrap.sh";
+  configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
+
+  buildPhase = "./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include 
-sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} 
threading=${threading} link=${link} ${cflags} install";
+
+  installPhase = ":";
+
+  crossAttrs = rec {
+    buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
+    # all buildInputs set previously fell into propagatedBuildInputs, as 
usual, so we have to
+    # override them.
+    propagatedBuildInputs = buildInputs;
+    # We want to substitute the contents of configureFlags, removing thus the
+    # usual --build and --host added on cross building.
+    preConfigure = ''
+      export configureFlags="--prefix=$out --without-icu"
+    '';
+    buildPhase = ''
+      set -x
+      cat << EOF > user-config.jam
+      using gcc : cross : $crossConfig-g++ ;
+      EOF
+      ./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include 
-sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} 
--user-config=user-config.jam toolset=gcc-cross variant=${variant} 
threading=${threading} link=${link} ${cflags} --without-python install
+    '';
+  };
+}

Added: nixpkgs/trunk/pkgs/development/libraries/protobuf/2.2.0.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/development/libraries/protobuf/2.2.0.nix Wed May  4 
10:03:46 2011        (r27132)
@@ -0,0 +1,28 @@
+{ fetchurl, stdenv, zlib }:
+
+stdenv.mkDerivation rec {
+  name = "protobuf-2.2.0";
+
+  src = fetchurl {
+    url = "http://protobuf.googlecode.com/files/${name}.tar.bz2";;
+    sha256 = "0jvj7i0fifl4fqjf84f67chb9b6q2z1jqkfc1zic9fz035mzn7bk";
+  };
+
+  buildInputs = [ zlib ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Protocol Buffers - Google's data interchange format";
+
+    longDescription =
+      '' Protocol Buffers are a way of encoding structured data in an
+         efficient yet extensible format.  Google uses Protocol Buffers for
+         almost all of its internal RPC protocols and file formats.
+      '';
+
+    license = "mBSD";
+
+    homepage = http://code.google.com/p/protobuf/;
+  };
+}

Modified: nixpkgs/trunk/pkgs/development/tools/misc/binutils/default.nix
==============================================================================
--- nixpkgs/trunk/pkgs/development/tools/misc/binutils/default.nix      Wed May 
 4 09:45:22 2011        (r27131)
+++ nixpkgs/trunk/pkgs/development/tools/misc/binutils/default.nix      Wed May 
 4 10:03:46 2011        (r27132)
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, noSysDirs, zlib, cross ? null}:
+{stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison, 
flex2535, bc, dejagnu}:
 
 let
     basename = "binutils-2.21";
@@ -18,7 +18,10 @@
     ./new-dtags.patch
   ];
 
-  buildInputs = [ zlib ];
+  buildInputs = [ zlib ] ++ stdenv.lib.optional gold [dejagnu flex2535 bison
+
+              # Some Gold tests require this:
+              bc] ;
 
   inherit noSysDirs;
 
@@ -38,7 +41,8 @@
   configureFlags = "--disable-werror" # needed for dietlibc build
       + stdenv.lib.optionalString (stdenv.system == "mips64-linux")
         " --enable-fix-loongson2f-nop"
-      + stdenv.lib.optionalString (cross != null) " --target=${cross.config}";
+      + stdenv.lib.optionalString (cross != null) " --target=${cross.config}"
+      + stdenv.lib.optionalString gold " --enable-gold" ;
 
   meta = {
     description = "GNU Binutils, tools for manipulating binaries (linker, 
assembler, etc.)";

Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed May  4 09:45:22 
2011        (r27131)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix       Wed May  4 10:03:46 
2011        (r27132)
@@ -992,6 +992,8 @@
 
   nilfs_utils = callPackage ../tools/filesystems/nilfs-utils {};
 
+  nlopt = callPackage ../development/libraries/nlopt {};
+
   nmap = callPackage ../tools/security/nmap {
     inherit (pythonPackages) pysqlite;
   };
@@ -2559,6 +2561,11 @@
     inherit noSysDirs;
   };
 
+  binutils_gold = callPackage ../development/tools/misc/binutils {
+    inherit noSysDirs;
+    gold = true;
+  };
+
   binutilsCross = forceBuildDrv (import ../development/tools/misc/binutils {
     inherit stdenv fetchurl zlib;
     noSysDirs = true;
@@ -2864,6 +2871,7 @@
 
   boost = callPackage ../development/libraries/boost { };
 
+  boost142 = callPackage ../development/libraries/boost/1.42.nix { };
   boost146 = callPackage ../development/libraries/boost/1.46.nix { };
 
   # A Boost build with all library variants enabled.  Very large (about 250 
MB).
@@ -2950,6 +2958,7 @@
   ctl = callPackage ../development/libraries/ctl { };
 
   cppunit = callPackage ../development/libraries/cppunit { };
+  cppunit_1_10 = callPackage ../development/libraries/cppunit/1.10.nix { };
 
   cracklib = callPackage ../development/libraries/cracklib { };
 
@@ -4067,6 +4076,7 @@
   postgis = callPackage ../development/libraries/postgis { };
 
   protobuf = callPackage ../development/libraries/protobuf { };
+  protobuf_2_2_0 = callPackage ../development/libraries/protobuf/2.2.0.nix { };
 
   pth = callPackage ../development/libraries/pth { };
 
_______________________________________________
nix-commits mailing list
nix-comm...@cs.uu.nl
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to