diff --git a/pkgs/development/libraries/gperftools/default.nix b/pkgs/development/libraries/gperftools/default.nix index 8c2feccebb7a..5fa14e64a22f 100644 --- a/pkgs/development/libraries/gperftools/default.nix +++ b/pkgs/development/libraries/gperftools/default.nix @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isLinux libunwind; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace Makefile.am --replace stdc++ c++ + substituteInPlace Makefile.in --replace stdc++ c++ + substituteInPlace libtool --replace stdc++ c++ + ''; + # some packages want to link to the static tcmalloc_minimal # to drop the runtime dependency on gperftools dontDisableStatic = true; diff --git a/pkgs/development/libraries/kyotocabinet/default.nix b/pkgs/development/libraries/kyotocabinet/default.nix index 6c4575b4e9d4..6617816b642b 100644 --- a/pkgs/development/libraries/kyotocabinet/default.nix +++ b/pkgs/development/libraries/kyotocabinet/default.nix @@ -8,6 +8,18 @@ stdenv.mkDerivation rec { sha256 = "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1"; }; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace kccommon.h \ + --replace tr1/unordered_map unordered_map \ + --replace tr1/unordered_set unordered_set \ + --replace tr1::hash std::hash \ + --replace tr1::unordered_map std::unordered_map \ + --replace tr1::unordered_set std::unordered_set + + substituteInPlace lab/kcdict/Makefile --replace stdc++ c++ + substituteInPlace configure --replace stdc++ c++ + ''; + buildInputs = [ zlib ]; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/libpcap/default.nix b/pkgs/development/libraries/libpcap/default.nix index 9ed1aab40346..213dbe50aaf6 100644 --- a/pkgs/development/libraries/libpcap/default.nix +++ b/pkgs/development/libraries/libpcap/default.nix @@ -17,6 +17,10 @@ stdenv.mkDerivation rec { else if stdenv.isDarwin then [ "--with-pcap=bpf" ] else []; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace " -arch i386" "" + ''; + preInstall = ''mkdir -p $out/bin''; crossAttrs = { diff --git a/pkgs/development/libraries/snappy/default.nix b/pkgs/development/libraries/snappy/default.nix index 90469508d0e5..5ae8f5e62521 100644 --- a/pkgs/development/libraries/snappy/default.nix +++ b/pkgs/development/libraries/snappy/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { # -DNDEBUG for speed configureFlags = [ "CXXFLAGS=-DNDEBUG" ]; - doCheck = true; + # SIGILL on darwin + doCheck = !stdenv.isDarwin; meta = with stdenv.lib; { homepage = http://code.google.com/p/snappy/; diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix index 5fe75248e353..347686014d1d 100644 --- a/pkgs/development/libraries/wiredtiger/default.nix +++ b/pkgs/development/libraries/wiredtiger/default.nix @@ -58,6 +58,12 @@ stdenv.mkDerivation rec { ./autogen.sh ''; + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' + substituteInPlace api/leveldb/leveldb_wt.h --replace \ + '#include "wiredtiger.h"' \ + ''$'#include "wiredtiger.h"\n#include "pthread.h"' + ''; + meta = { homepage = http://wiredtiger.com/; description = ""; diff --git a/pkgs/servers/nosql/mongodb/default.nix b/pkgs/servers/nosql/mongodb/default.nix index 81205c92d4cc..318bda2fe442 100644 --- a/pkgs/servers/nosql/mongodb/default.nix +++ b/pkgs/servers/nosql/mongodb/default.nix @@ -21,6 +21,10 @@ let version = "3.0.4"; ] ++ optional stdenv.is64bit wiredtiger; other-args = concatStringsSep " " ([ + # these are opt-in, lol + "--cc-use-shell-environment" + "--cxx-use-shell-environment" + "--c++11=on" "--ssl" #"--rocksdb" # Don't have this packaged yet @@ -47,6 +51,13 @@ in stdenv.mkDerivation rec { # fix environment variable reading substituteInPlace SConstruct \ --replace "env = Environment(" "env = Environment(ENV = os.environ," + '' + stdenv.lib.optionalString stdenv.isDarwin '' + + substituteInPlace src/third_party/s2/s1angle.cc --replace drem remainder + substituteInPlace src/third_party/s2/s1interval.cc --replace drem remainder + substituteInPlace src/third_party/s2/s2cap.cc --replace drem remainder + substituteInPlace src/third_party/s2/s2latlng.cc --replace drem remainder + substituteInPlace src/third_party/s2/s2latlngrect.cc --replace drem remainder ''; buildPhase = ''