diff --git a/pkgs/applications/version-management/subversion/default.nix b/pkgs/applications/version-management/subversion/default.nix index 30283ad387c8..af9827ef4b85 100644 --- a/pkgs/applications/version-management/subversion/default.nix +++ b/pkgs/applications/version-management/subversion/default.nix @@ -46,8 +46,6 @@ stdenv.mkDerivation (rec { preBuild = '' makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules) - '' + stdenv.lib.optionalString stdenv.isDarwin '' - substituteInPlace configure --replace "-no-cpp-precomp" "" ''; postInstall = '' diff --git a/pkgs/development/compilers/llvm/3.4/llvm.nix b/pkgs/development/compilers/llvm/3.4/llvm.nix index fbc881fc8e02..dfd7b5570eae 100644 --- a/pkgs/development/compilers/llvm/3.4/llvm.nix +++ b/pkgs/development/compilers/llvm/3.4/llvm.nix @@ -65,6 +65,6 @@ in stdenv.mkDerivation rec { license = stdenv.lib.licenses.bsd3; maintainers = with stdenv.lib.maintainers; [ shlevy lovek323 raskin viric ]; platforms = stdenv.lib.platforms.all; - broken = stdenv.isDarwin; + # broken = stdenv.isDarwin; }; } diff --git a/pkgs/development/libraries/libc++abi/default.nix b/pkgs/development/libraries/libc++abi/default.nix index 8218cbb966f0..aae3027fd629 100644 --- a/pkgs/development/libraries/libc++abi/default.nix +++ b/pkgs/development/libraries/libc++abi/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchsvn, libcxx, libunwind }: +{ stdenv, fetchsvn, libcxx, libunwind, gnused }: let rev = "199626"; in stdenv.mkDerivation { @@ -15,17 +15,16 @@ in stdenv.mkDerivation { postUnpack = '' unpackFile ${libcxx.src} export NIX_CFLAGS_COMPILE="-I${libunwind}/include -I$PWD/include -I$(readlink -f libcxx-*)/include" + export TRIPLE=x86_64-apple-darwin ''; installPhase = '' install -d -m 755 $out/include $out/lib - install -m 644 lib/libc++abi.so.1.0 $out/lib + install -m 644 lib/libc++abi.dylib $out/lib install -m 644 include/cxxabi.h $out/include - ln -s libc++abi.so.1.0 $out/lib/libc++abi.so - ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1 ''; - patchPhase = "sed -e s,-lstdc++,, -i lib/buildit"; + patchPhase = "${gnused}/bin/sed -e s,-lstdc++,, -i lib/buildit"; buildPhase = "(cd lib; ./buildit)"; diff --git a/pkgs/development/libraries/libunwind/native.nix b/pkgs/development/libraries/libunwind/native.nix new file mode 100644 index 000000000000..dd2ebb6a6422 --- /dev/null +++ b/pkgs/development/libraries/libunwind/native.nix @@ -0,0 +1,22 @@ +{ stdenv }: + +stdenv.mkDerivation { + name = "libunwind-native"; + + unpackPhase = ":"; + dontBuild = true; + + installPhase = '' + mkdir -p $out/lib + cat ${/usr/lib/system/libunwind.dylib} > $out/lib/libunwind.dylib + /usr/bin/install_name_tool \ + -change /usr/lib/system/libunwind.dylib ${/usr/lib/system/libunwind.dylib} \ + -change /usr/lib/system/libsystem_malloc.dylib ${/usr/lib/system/libsystem_malloc.dylib} \ + -change /usr/lib/system/libsystem_pthread.dylib ${/usr/lib/system/libsystem_pthread.dylib} \ + -change /usr/lib/system/libsystem_platform.dylib ${/usr/lib/system/libsystem_platform.dylib} \ + -change /usr/lib/system/libsystem_c.dylib ${/usr/lib/system/libsystem_c.dylib} \ + -change /usr/lib/system/libdyld.dylib ${/usr/lib/system/libdyld.dylib} \ + -change /usr/lib/system/libkeymgr.dylib ${/usr/lib/system/libkeymgr.dylib} \ + $out/lib/libunwind.dylib + ''; +} diff --git a/pkgs/development/libraries/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix index 3d05fa2e0405..dd132cfb5b7b 100644 --- a/pkgs/development/libraries/mpc/default.nix +++ b/pkgs/development/libraries/mpc/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { buildInputs = [ gmp mpfr ]; + CFLAGS = "-I${gmp}/include"; + doCheck = true; meta = { diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index 653481aeccd6..d999ba0cda5c 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ]; + CFLAGS = "-I${gmp}/include"; + configureFlags = /* Work around a FreeBSD bug that otherwise leads to segfaults in the test suite: http://hydra.bordeaux.inria.fr/build/34862 diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix index 033e53e521d5..49d7cec95901 100644 --- a/pkgs/development/libraries/serf/default.nix +++ b/pkgs/development/libraries/serf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, krb5, pkgconfig }: +{ stdenv, fetchurl, apr, scons, openssl, aprutil, zlib, krb5, pkgconfig, gnused }: stdenv.mkDerivation rec { name = "serf-1.3.7"; @@ -11,9 +11,9 @@ stdenv.mkDerivation rec { buildInputs = [ apr scons openssl aprutil zlib krb5 pkgconfig ]; configurePhase = '' - sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"PATH":os.environ["PATH"]})' -i SConstruct - sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_CFLAGS_COMPILE":os.environ["NIX_CFLAGS_COMPILE"]})' -i SConstruct - sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_LDFLAGS":os.environ["NIX_LDFLAGS"]})' -i SConstruct + ${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"PATH":os.environ["PATH"]})' -i SConstruct + ${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_CFLAGS_COMPILE":os.environ["NIX_CFLAGS_COMPILE"]})' -i SConstruct + ${gnused}/bin/sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_LDFLAGS":os.environ["NIX_LDFLAGS"]})' -i SConstruct ''; buildPhase = '' diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 5c2044386c6e..d9668d0972cf 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -27,6 +27,11 @@ import ../generic rec { nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr"; nativeLibc = true; inherit stdenv; + libcxx = pkgs.libcxx.override { + libcxxabi = pkgs.libcxxabi.override { + libunwind = pkgs.libunwindNative; + }; + }; binutils = import ../../build-support/native-darwin-cctools-wrapper {inherit stdenv;}; clang = pkgs.clang_34; coreutils = pkgs.coreutils; diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 6631214f39ab..e64bc3293939 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -22,6 +22,8 @@ stdenv.mkDerivation rec { postUnpack = '' export CPATH="${bzip2}/include" export LIBRARY_PATH="${bzip2}/lib" + export CXX=/usr/bin/clang++ + export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal" ''; configureFlags = @@ -32,7 +34,7 @@ stdenv.mkDerivation rec { --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} --disable-init-state --enable-gc - CFLAGS=-O3 CXXFLAGS=-O3 + CFLAGS=-O3 ''; makeFlags = "profiledir=$(out)/etc/profile.d"; diff --git a/pkgs/tools/package-management/nix/unstable.nix b/pkgs/tools/package-management/nix/unstable.nix index 5c20c7eb72aa..514924325e4a 100644 --- a/pkgs/tools/package-management/nix/unstable.nix +++ b/pkgs/tools/package-management/nix/unstable.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, perl, curl, bzip2, sqlite, openssl ? null -, pkgconfig, boehmgc, perlPackages +, pkgconfig, boehmgc, perlPackages, bash , storeDir ? "/nix/store" , stateDir ? "/nix/var" }: @@ -24,6 +24,7 @@ stdenv.mkDerivation rec { postUnpack = '' export CPATH="${bzip2}/include" export LIBRARY_PATH="${bzip2}/lib" + export CXXFLAGS="-O3 -Wno-error=reserved-user-defined-literal" ''; configureFlags = @@ -34,7 +35,7 @@ stdenv.mkDerivation rec { --with-www-curl=${perlPackages.WWWCurl}/${perl.libPrefix} --disable-init-state --enable-gc - CFLAGS=-O3 CXXFLAGS=-O3 + CFLAGS=-O3 ''; makeFlags = "profiledir=$(out)/etc/profile.d"; diff --git a/pkgs/tools/text/sgml/opensp/default.nix b/pkgs/tools/text/sgml/opensp/default.nix index 59b9b7bc13d1..71901b20ff1d 100644 --- a/pkgs/tools/text/sgml/opensp/default.nix +++ b/pkgs/tools/text/sgml/opensp/default.nix @@ -13,6 +13,11 @@ stdenv.mkDerivation { docsrc/*.xml ''; + configureFlags = [ + "--with-libintl-prefix=/usr" + "--with-libiconv-prefix=/usr" + ]; + setupHook = ./setup-hook.sh; buildInputs = [ xmlto docbook_xml_dtd_412 libxslt docbook_xsl ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4995b0e1d75..8e130d8c1b85 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5699,6 +5699,8 @@ let libunwind = callPackage ../development/libraries/libunwind { }; + libunwindNative = callPackage ../development/libraries/libunwind/native.nix {}; + libuvVersions = callPackage ../development/libraries/libuv { }; libv4l = lowPrio (v4l_utils.override {