make changes needed to build mongodb
This commit is contained in:
parent
748da7e541
commit
4fab7321bf
@ -10,6 +10,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isLinux libunwind;
|
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
|
# some packages want to link to the static tcmalloc_minimal
|
||||||
# to drop the runtime dependency on gperftools
|
# to drop the runtime dependency on gperftools
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
|
@ -8,6 +8,18 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0g6js20x7vnpq4p8ghbw3mh9wpqksya9vwhzdx6dnlf354zjsal1";
|
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 ];
|
buildInputs = [ zlib ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -17,6 +17,10 @@ stdenv.mkDerivation rec {
|
|||||||
else if stdenv.isDarwin then [ "--with-pcap=bpf" ]
|
else if stdenv.isDarwin then [ "--with-pcap=bpf" ]
|
||||||
else [];
|
else [];
|
||||||
|
|
||||||
|
prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace configure --replace " -arch i386" ""
|
||||||
|
'';
|
||||||
|
|
||||||
preInstall = ''mkdir -p $out/bin'';
|
preInstall = ''mkdir -p $out/bin'';
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
|
@ -19,7 +19,8 @@ stdenv.mkDerivation rec {
|
|||||||
# -DNDEBUG for speed
|
# -DNDEBUG for speed
|
||||||
configureFlags = [ "CXXFLAGS=-DNDEBUG" ];
|
configureFlags = [ "CXXFLAGS=-DNDEBUG" ];
|
||||||
|
|
||||||
doCheck = true;
|
# SIGILL on darwin
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://code.google.com/p/snappy/;
|
homepage = http://code.google.com/p/snappy/;
|
||||||
|
@ -58,6 +58,12 @@ stdenv.mkDerivation rec {
|
|||||||
./autogen.sh
|
./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 = {
|
meta = {
|
||||||
homepage = http://wiredtiger.com/;
|
homepage = http://wiredtiger.com/;
|
||||||
description = "";
|
description = "";
|
||||||
|
@ -21,6 +21,10 @@ let version = "3.0.4";
|
|||||||
] ++ optional stdenv.is64bit wiredtiger;
|
] ++ optional stdenv.is64bit wiredtiger;
|
||||||
|
|
||||||
other-args = concatStringsSep " " ([
|
other-args = concatStringsSep " " ([
|
||||||
|
# these are opt-in, lol
|
||||||
|
"--cc-use-shell-environment"
|
||||||
|
"--cxx-use-shell-environment"
|
||||||
|
|
||||||
"--c++11=on"
|
"--c++11=on"
|
||||||
"--ssl"
|
"--ssl"
|
||||||
#"--rocksdb" # Don't have this packaged yet
|
#"--rocksdb" # Don't have this packaged yet
|
||||||
@ -47,6 +51,13 @@ in stdenv.mkDerivation rec {
|
|||||||
# fix environment variable reading
|
# fix environment variable reading
|
||||||
substituteInPlace SConstruct \
|
substituteInPlace SConstruct \
|
||||||
--replace "env = Environment(" "env = Environment(ENV = os.environ,"
|
--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 = ''
|
buildPhase = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user