diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/servers/foundationdb | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/servers/foundationdb')
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/default.nix | 194 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/fix-scm-version.patch | 42 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/ldflags-5.1.patch | 90 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/ldflags-5.2.patch | 90 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/ldflags-6.0.patch | 78 | ||||
-rw-r--r-- | nixpkgs/pkgs/servers/foundationdb/python.nix | 24 |
6 files changed, 518 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/foundationdb/default.nix b/nixpkgs/pkgs/servers/foundationdb/default.nix new file mode 100644 index 000000000000..5d8e347de99d --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/default.nix @@ -0,0 +1,194 @@ +{ stdenv49 +, lib, fetchurl, fetchpatch, fetchFromGitHub + +, which, findutils, m4, gawk +, python, openjdk, mono, libressl +}: + +let + # hysterical raisins dictate a version of boost this old. however, + # we luckily do not need to build anything, we just need the header + # files. + boost152 = stdenv49.mkDerivation rec { + name = "boost-headers-1.52.0"; + + src = fetchurl { + url = "mirror://sourceforge/boost/boost_1_52_0.tar.bz2"; + sha256 = "14mc7gsnnahdjaxbbslzk79rc0d12h1i681cd3srdwr3fzynlar2"; + }; + + configurePhase = ":"; + buildPhase = ":"; + installPhase = "mkdir -p $out/include && cp -R boost $out/include/"; + }; + + makeFdb = + { version + , branch + , sha256 + + # the revision can be inferred from the fdb tagging policy + , rev ? "refs/tags/${version}" + + # in theory newer versions of fdb support newer compilers, but they + # don't :( maybe one day + , stdenv ? stdenv49 + + # in theory newer versions of fdb support newer boost versions, but they + # don't :( maybe one day + , boost ? boost152 + + # if an release is unofficial/a prerelease, then make sure this is set + , officialRelease ? true + }: stdenv.mkDerivation rec { + name = "foundationdb-${version}"; + inherit version; + + src = fetchFromGitHub { + owner = "apple"; + repo = "foundationdb"; + inherit rev sha256; + }; + + nativeBuildInputs = [ python openjdk gawk which m4 findutils mono ]; + buildInputs = [ libressl boost ]; + + patches = + [ # For 5.2+, we need a slightly adjusted patch to fix all the ldflags + (if lib.versionAtLeast version "5.2" + then (if lib.versionAtLeast version "6.0" + then ./ldflags-6.0.patch + else ./ldflags-5.2.patch) + else ./ldflags-5.1.patch) + ] + # for 6.0+, we do NOT need to apply this version fix, since we can specify + # it ourselves. see configurePhase + ++ (lib.optional (!lib.versionAtLeast version "6.0") ./fix-scm-version.patch) + # Versions less than 6.0 have a busted Python 3 build due to an outdated + # use of 'print'. Also apply an update to the six module with many bugfixes, + # which is in 6.0+ as well + ++ (lib.optional (!lib.versionAtLeast version "6.0") (fetchpatch { + name = "update-python-six.patch"; + url = "https://github.com/apple/foundationdb/commit/4bd9efc4fc74917bc04b07a84eb065070ea7edb2.patch"; + sha256 = "030679lmc86f1wzqqyvxnwjyfrhh54pdql20ab3iifqpp9i5mi85"; + })) + ++ (lib.optional (!lib.versionAtLeast version "6.0") (fetchpatch { + name = "import-for-python-print.patch"; + url = "https://github.com/apple/foundationdb/commit/ded17c6cd667f39699cf663c0e87fe01e996c153.patch"; + sha256 = "11y434w68cpk7shs2r22hyrpcrqi8vx02cw7v5x79qxvnmdxv2an"; + })) + ; + + postPatch = '' + # note: this does not do anything for 6.0+ + substituteInPlace ./build/scver.mk \ + --subst-var-by NIXOS_FDB_VERSION_ID "${rev}" \ + --subst-var-by NIXOS_FDB_SCBRANCH "${branch}" + + substituteInPlace ./Makefile \ + --replace 'shell which ccache' 'shell true' \ + --replace -Werror "" + + substituteInPlace ./Makefile \ + --replace libstdc++_pic libstdc++ + + substituteInPlace ./build/link-validate.sh \ + --replace 'exit 1' '#exit 1' + + patchShebangs . + '' + lib.optionalString (lib.versionAtLeast version "6.0") '' + substituteInPlace ./Makefile \ + --replace 'TLS_LIBS +=' '#TLS_LIBS +=' \ + --replace 'LDFLAGS :=' 'LDFLAGS := -ltls -lssl -lcrypto' + ''; + + separateDebugInfo = true; + enableParallelBuilding = true; + + makeFlags = [ "all" "fdb_java" "fdb_python" ] + # Don't compile FDBLibTLS if we don't need it in 6.0 or later; + # it gets statically linked in + ++ lib.optional (!lib.versionAtLeast version "6.0") [ "fdb_c" ] + # Needed environment overrides + ++ [ "KVRELEASE=1" + "NOSTRIP=1" + ] ++ lib.optional officialRelease [ "RELEASE=true" ]; + + # on 6.0 and later, we can specify all this information manually + configurePhase = lib.optionalString (lib.versionAtLeast version "6.0") '' + export SOURCE_CONTROL=GIT + export SCBRANCH="${branch}" + export VERSION_ID="${rev}" + ''; + + installPhase = '' + mkdir -vp $out/{bin,libexec/plugins} $lib/{lib,share/java} $dev/include/foundationdb + + '' + lib.optionalString (!lib.versionAtLeast version "6.0") '' + # we only copy the TLS library on < 6.0, since it's compiled-in otherwise + cp -v ./lib/libFDBLibTLS.so $out/libexec/plugins/FDBLibTLS.so + '' + '' + + # C API + cp -v ./lib/libfdb_c.so $lib/lib + cp -v ./bindings/c/foundationdb/fdb_c.h $dev/include/foundationdb + cp -v ./bindings/c/foundationdb/fdb_c_options.g.h $dev/include/foundationdb + cp -v ./fdbclient/vexillographer/fdb.options $dev/include/foundationdb + + # java + cp -v ./bindings/java/foundationdb-client.jar $lib/share/java/fdb-java.jar + + # python + cp LICENSE ./bindings/python + substitute ./bindings/python/setup.py.in ./bindings/python/setup.py \ + --replace 'VERSION' "${version}" + rm -f ./bindings/python/setup.py.in + rm -f ./bindings/python/fdb/*.pth # remove useless files + rm -f ./bindings/python/*.rst ./bindings/python/*.mk + + cp -R ./bindings/python/ tmp-pythonsrc/ + tar -zcf $pythonsrc --transform s/tmp-pythonsrc/python-foundationdb/ ./tmp-pythonsrc/ + + # binaries + for x in fdbbackup fdbcli fdbserver fdbmonitor; do + cp -v "./bin/$x" $out/bin; + done + + ln -sfv $out/bin/fdbbackup $out/bin/dr_agent + ln -sfv $out/bin/fdbbackup $out/bin/fdbrestore + ln -sfv $out/bin/fdbbackup $out/bin/fdbdr + + ln -sfv $out/bin/fdbbackup $out/libexec/backup_agent + ''; + + outputs = [ "out" "lib" "dev" "pythonsrc" ]; + + meta = with stdenv.lib; { + description = "Open source, distributed, transactional key-value store"; + homepage = https://www.foundationdb.org; + license = licenses.asl20; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ thoughtpolice ]; + }; + }; + +in with builtins; { + + foundationdb51 = makeFdb rec { + version = "5.1.7"; + branch = "release-5.1"; + sha256 = "1rc472ih24f9s5g3xmnlp3v62w206ny0pvvw02bzpix2sdrpbp06"; + }; + + foundationdb52 = makeFdb rec { + version = "5.2.8"; + branch = "release-5.2"; + sha256 = "1kbmmhk2m9486r4kyjlc7bb3wd50204i0p6dxcmvl6pbp1bs0wlb"; + }; + + foundationdb60 = makeFdb rec { + version = "6.0.17"; + branch = "release-6.0"; + sha256 = "00m6dkv2nm51zhiq049fiivnz8hpc8w21y024lykhn16kyjdnfhs"; + }; +} diff --git a/nixpkgs/pkgs/servers/foundationdb/fix-scm-version.patch b/nixpkgs/pkgs/servers/foundationdb/fix-scm-version.patch new file mode 100644 index 000000000000..0e0df7ade82b --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/fix-scm-version.patch @@ -0,0 +1,42 @@ +diff --git a/build/scver.mk b/build/scver.mk +index bdae8be..7539864 100644 +--- a/build/scver.mk ++++ b/build/scver.mk +@@ -98,33 +98,10 @@ endif + GITPRESENT := $(wildcard $(FDBDIR)/.git) + HGPRESENT := $(wildcard $(FDBDIR)/.hg) + +-# Use Git, if not missing +-ifneq ($(GITPRESENT),) +- SCVER := $(shell cd "$(FDBDIR)" && git --version 2>/dev/null) +- ifneq ($(SCVER),) +- VERSION_ID := $(shell cd "$(FDBDIR)" && git rev-parse --verify HEAD) +- SOURCE_CONTROL := GIT +- SCBRANCH := $(shell cd "$(FDBDIR)" && git rev-parse --abbrev-ref HEAD) +- else +-$(error Missing git executable on $(PLATFORM) ) +- endif +-# Otherwise, use Mercurial +-else +- # Otherwise, use Mercurial, if not missing +- ifneq ($(HGPRESENT),) +- SCVER := $(shell cd "$(FDBDIR)" && hg --version 2>/dev/null) +- ifdef SCVER +- VERSION_ID := $(shell cd "$(FDBDIR)" && hg id -n) +- SOURCE_CONTROL := MERCURIAL +- SCBRANCH := $(shell cd "$(FDBDIR)" && hg branch) +- else +-$(error Missing hg executable on $(PLATFORM)) +- endif +- else +- FDBFILES := (shell ls -la $(FDBDIR)) +-$(error Missing source control information for source on $(PLATFORM) in directory: $(FDBDIR) with files: $(FDBFILES)) +- endif +-endif ++# NixOS-specific non-VCS packaging, filled out by the nix build ++SOURCE_CONTROL := GIT ++VERSION_ID := @NIXOS_FDB_VERSION_ID@ ++SCBRANCH := @NIXOS_FDB_SCBRANCH@ + + # Set the RELEASE variable based on the KVRELEASE variable. + ifeq ($(KVRELEASE),1) diff --git a/nixpkgs/pkgs/servers/foundationdb/ldflags-5.1.patch b/nixpkgs/pkgs/servers/foundationdb/ldflags-5.1.patch new file mode 100644 index 000000000000..4d523a7ecdd3 --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/ldflags-5.1.patch @@ -0,0 +1,90 @@ +diff --git a/FDBLibTLS/local.mk b/FDBLibTLS/local.mk +index 0b6eac8..b1891ca 100644 +--- a/FDBLibTLS/local.mk ++++ b/FDBLibTLS/local.mk +@@ -1,6 +1,5 @@ + FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR) +-FDBLibTLS_STATIC_LIBS := -ltls -lssl -lcrypto +-FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt ++FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt -ltls -lssl -lcrypto + FDBLibTLS_LDFLAGS += -Wl,-soname,FDBLibTLS.so -Wl,--version-script=FDBLibTLS/FDBLibTLS.map + + # The plugin isn't a typical library, so it feels more sensible to have a copy +diff --git a/bindings/c/local.mk b/bindings/c/local.mk +index 44f0c31..7aea5a4 100644 +--- a/bindings/c/local.mk ++++ b/bindings/c/local.mk +@@ -29,8 +29,8 @@ fdb_c_tests_HEADERS := -Ibindings/c + CLEAN_TARGETS += fdb_c_tests_clean + + ifeq ($(PLATFORM),linux) +- fdb_c_LIBS += lib/libstdc++.a -lm -lpthread -lrt -ldl +- fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete ++ fdb_c_LIBS += lib/libstdc++.a ++ fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete -lm -lpthread -lrt -ldl + fdb_c_tests_LIBS += -lpthread + endif + +diff --git a/bindings/flow/tester/local.mk b/bindings/flow/tester/local.mk +index 2ef4fcb..6e59625 100644 +--- a/bindings/flow/tester/local.mk ++++ b/bindings/flow/tester/local.mk +@@ -35,8 +35,7 @@ _fdb_flow_tester_clean: + @rm -rf bindings/flow/bin + + ifeq ($(PLATFORM),linux) +- fdb_flow_tester_LIBS += -ldl -lpthread -lrt +- fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + else ifeq ($(PLATFORM),osx) + fdb_flow_tester_LDFLAGS += -lc++ + endif +diff --git a/fdbbackup/local.mk b/fdbbackup/local.mk +index 033fe7d..865fc92 100644 +--- a/fdbbackup/local.mk ++++ b/fdbbackup/local.mk +@@ -25,8 +25,7 @@ fdbbackup_LDFLAGS := $(fdbrpc_LDFLAGS) + fdbbackup_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + + ifeq ($(PLATFORM),linux) +- fdbbackup_LIBS += -ldl -lpthread -lrt +- fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbbackup_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 +diff --git a/fdbcli/local.mk b/fdbcli/local.mk +index 81a4a42..892c079 100644 +--- a/fdbcli/local.mk ++++ b/fdbcli/local.mk +@@ -22,14 +22,13 @@ + + fdbcli_CFLAGS := $(fdbclient_CFLAGS) + fdbcli_LDFLAGS := $(fdbrpc_LDFLAGS) +-fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a -ldl ++fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + fdbcli_STATIC_LIBS := + + fdbcli_GENERATED_SOURCES += versions.h + + ifeq ($(PLATFORM),linux) +- fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc +- fdbcli_LIBS += -lpthread -lrt ++ fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc -lpthread -lrt -ldl + else ifeq ($(PLATFORM),osx) + fdbcli_LDFLAGS += -lc++ + endif +diff --git a/fdbserver/local.mk b/fdbserver/local.mk +index 78cad1b..36f2c0f 100644 +--- a/fdbserver/local.mk ++++ b/fdbserver/local.mk +@@ -25,8 +25,7 @@ fdbserver_LDFLAGS := $(fdbrpc_LDFLAGS) + fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + + ifeq ($(PLATFORM),linux) +- fdbserver_LIBS += -ldl -lpthread -lrt +- fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 diff --git a/nixpkgs/pkgs/servers/foundationdb/ldflags-5.2.patch b/nixpkgs/pkgs/servers/foundationdb/ldflags-5.2.patch new file mode 100644 index 000000000000..ee5911e495f8 --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/ldflags-5.2.patch @@ -0,0 +1,90 @@ +diff --git a/FDBLibTLS/local.mk b/FDBLibTLS/local.mk +index 5e6b9cfb..73f4e5f3 100644 +--- a/FDBLibTLS/local.mk ++++ b/FDBLibTLS/local.mk +@@ -1,6 +1,5 @@ + FDBLibTLS_CFLAGS := -fPIC -I/usr/local/include -I$(BOOSTDIR) -Ifdbrpc +-FDBLibTLS_STATIC_LIBS := -ltls -lssl -lcrypto +-FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt ++FDBLibTLS_LDFLAGS := -L/usr/local/lib -static-libstdc++ -static-libgcc -lrt -ltls -lssl -lcrypto + FDBLibTLS_LDFLAGS += -Wl,-soname,FDBLibTLS.so -Wl,--version-script=FDBLibTLS/FDBLibTLS.map + + # The plugin isn't a typical library, so it feels more sensible to have a copy +diff --git a/bindings/c/local.mk b/bindings/c/local.mk +index 44f0c31b..7aea5a4f 100644 +--- a/bindings/c/local.mk ++++ b/bindings/c/local.mk +@@ -29,8 +29,8 @@ fdb_c_tests_HEADERS := -Ibindings/c + CLEAN_TARGETS += fdb_c_tests_clean + + ifeq ($(PLATFORM),linux) +- fdb_c_LIBS += lib/libstdc++.a -lm -lpthread -lrt -ldl +- fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete ++ fdb_c_LIBS += lib/libstdc++.a ++ fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete -lm -lpthread -lrt -ldl + fdb_c_tests_LIBS += -lpthread + endif + +diff --git a/bindings/flow/tester/local.mk b/bindings/flow/tester/local.mk +index 2ef4fcb7..6e59625c 100644 +--- a/bindings/flow/tester/local.mk ++++ b/bindings/flow/tester/local.mk +@@ -35,8 +35,7 @@ _fdb_flow_tester_clean: + @rm -rf bindings/flow/bin + + ifeq ($(PLATFORM),linux) +- fdb_flow_tester_LIBS += -ldl -lpthread -lrt +- fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + else ifeq ($(PLATFORM),osx) + fdb_flow_tester_LDFLAGS += -lc++ + endif +diff --git a/fdbbackup/local.mk b/fdbbackup/local.mk +index 033fe7d4..865fc923 100644 +--- a/fdbbackup/local.mk ++++ b/fdbbackup/local.mk +@@ -25,8 +25,7 @@ fdbbackup_LDFLAGS := $(fdbrpc_LDFLAGS) + fdbbackup_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + + ifeq ($(PLATFORM),linux) +- fdbbackup_LIBS += -ldl -lpthread -lrt +- fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbbackup_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 +diff --git a/fdbcli/local.mk b/fdbcli/local.mk +index 81a4a42e..892c079c 100644 +--- a/fdbcli/local.mk ++++ b/fdbcli/local.mk +@@ -22,14 +22,13 @@ + + fdbcli_CFLAGS := $(fdbclient_CFLAGS) + fdbcli_LDFLAGS := $(fdbrpc_LDFLAGS) +-fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a -ldl ++fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + fdbcli_STATIC_LIBS := + + fdbcli_GENERATED_SOURCES += versions.h + + ifeq ($(PLATFORM),linux) +- fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc +- fdbcli_LIBS += -lpthread -lrt ++ fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc -lpthread -lrt -ldl + else ifeq ($(PLATFORM),osx) + fdbcli_LDFLAGS += -lc++ + endif +diff --git a/fdbserver/local.mk b/fdbserver/local.mk +index 78cad1bf..36f2c0f7 100644 +--- a/fdbserver/local.mk ++++ b/fdbserver/local.mk +@@ -25,8 +25,7 @@ fdbserver_LDFLAGS := $(fdbrpc_LDFLAGS) + fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a + + ifeq ($(PLATFORM),linux) +- fdbserver_LIBS += -ldl -lpthread -lrt +- fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 diff --git a/nixpkgs/pkgs/servers/foundationdb/ldflags-6.0.patch b/nixpkgs/pkgs/servers/foundationdb/ldflags-6.0.patch new file mode 100644 index 000000000000..1fa17a9615aa --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/ldflags-6.0.patch @@ -0,0 +1,78 @@ +diff --git a/bindings/c/local.mk b/bindings/c/local.mk +index c861a29c..ff886e93 100644 +--- a/bindings/c/local.mk ++++ b/bindings/c/local.mk +@@ -30,8 +30,8 @@ fdb_c_tests_HEADERS := -Ibindings/c + CLEAN_TARGETS += fdb_c_tests_clean + + ifeq ($(PLATFORM),linux) +- fdb_c_LIBS += lib/libstdc++.a -lm -lpthread -lrt -ldl +- fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete ++ fdb_c_LIBS += lib/libstdc++.a ++ fdb_c_LDFLAGS += -Wl,--version-script=bindings/c/fdb_c.map -static-libgcc -Wl,-z,nodelete -lm -lpthread -lrt -ldl + fdb_c_tests_LIBS += -lpthread + endif + +diff --git a/bindings/flow/tester/local.mk b/bindings/flow/tester/local.mk +index 2ef4fcb7..6e59625c 100644 +--- a/bindings/flow/tester/local.mk ++++ b/bindings/flow/tester/local.mk +@@ -35,8 +35,7 @@ _fdb_flow_tester_clean: + @rm -rf bindings/flow/bin + + ifeq ($(PLATFORM),linux) +- fdb_flow_tester_LIBS += -ldl -lpthread -lrt +- fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdb_flow_tester_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + else ifeq ($(PLATFORM),osx) + fdb_flow_tester_LDFLAGS += -lc++ + endif +diff --git a/fdbbackup/local.mk b/fdbbackup/local.mk +index ca5dbab6..012f0130 100644 +--- a/fdbbackup/local.mk ++++ b/fdbbackup/local.mk +@@ -26,8 +26,7 @@ fdbbackup_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB + fdbbackup_STATIC_LIBS := $(TLS_LIBS) + + ifeq ($(PLATFORM),linux) +- fdbbackup_LIBS += -ldl -lpthread -lrt +- fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbbackup_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbbackup_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 +diff --git a/fdbcli/local.mk b/fdbcli/local.mk +index fd738876..3af026b9 100644 +--- a/fdbcli/local.mk ++++ b/fdbcli/local.mk +@@ -22,14 +22,13 @@ + + fdbcli_CFLAGS := $(fdbclient_CFLAGS) + fdbcli_LDFLAGS := $(fdbrpc_LDFLAGS) +-fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a -ldl $(FDB_TLS_LIB) ++fdbcli_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB) + fdbcli_STATIC_LIBS := $(TLS_LIBS) + + fdbcli_GENERATED_SOURCES += versions.h + + ifeq ($(PLATFORM),linux) +- fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc +- fdbcli_LIBS += -lpthread -lrt ++ fdbcli_LDFLAGS += -static-libstdc++ -static-libgcc -lpthread -lrt -ldl + else ifeq ($(PLATFORM),osx) + fdbcli_LDFLAGS += -lc++ + endif +diff --git a/fdbserver/local.mk b/fdbserver/local.mk +index 690916d0..475abbaf 100644 +--- a/fdbserver/local.mk ++++ b/fdbserver/local.mk +@@ -26,8 +26,7 @@ fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB + fdbserver_STATIC_LIBS := $(TLS_LIBS) + + ifeq ($(PLATFORM),linux) +- fdbserver_LIBS += -ldl -lpthread -lrt +- fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc ++ fdbserver_LDFLAGS += -static-libstdc++ -static-libgcc -ldl -lpthread -lrt + + # GPerfTools profiler (uncomment to use) + # fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 diff --git a/nixpkgs/pkgs/servers/foundationdb/python.nix b/nixpkgs/pkgs/servers/foundationdb/python.nix new file mode 100644 index 000000000000..55b834c54369 --- /dev/null +++ b/nixpkgs/pkgs/servers/foundationdb/python.nix @@ -0,0 +1,24 @@ +{ buildPythonPackage, lib, foundationdb }: + +buildPythonPackage rec { + pname = "foundationdb"; + version = foundationdb.version; + + src = foundationdb.pythonsrc; + unpackCmd = "tar xf $curSrc"; + + patchPhase = '' + substituteInPlace ./fdb/impl.py \ + --replace libfdb_c.so "${foundationdb.lib}/lib/libfdb_c.so" + ''; + + doCheck = false; + + meta = with lib; { + description = "Python bindings for FoundationDB"; + homepage = https://www.foundationdb.org; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ thoughtpolice ]; + }; +} + |