@@ -1,42 +1,17 @@
1−{ stdenv49
2−, lib, fetchurl, fetchFromGitHub
3−
1+{ stdenv, fetchurl, fetchFromGitHub
42, which, findutils, m4, gawk
5−, python, openjdk, mono58, libressl
3+, python, openjdk, mono58, libressl_2_6
4+, boost16x
65}:
76
87let
9− # hysterical raisins dictate a version of boost this old. however,
10− # we luckily do not need to build anything, we just need the header
11− # files.
12− boost152 = stdenv49.mkDerivation rec {
13− name = "boost-headers-1.52.0";
14−
15− src = fetchurl {
16− url = "mirror://sourceforge/boost/boost_1_52_0.tar.bz2";
17− sha256 = "14mc7gsnnahdjaxbbslzk79rc0d12h1i681cd3srdwr3fzynlar2";
18− };
19−
20− configurePhase = ":";
21− buildPhase = ":";
22− installPhase = "mkdir -p $out/include && cp -R boost $out/include/";
23− };
24−
258 makeFdb =
269 { version
2710 , branch
28− , sha256
29−
30− # the revision can be inferred from the fdb tagging policy
31− , rev ? "refs/tags/${version}"
11+ , rev, sha256
3212
33− # in theory newer versions of fdb support newer compilers, but they
34− # don't :( maybe one day
35− , stdenv ? stdenv49
36−
37− # in theory newer versions of fdb support newer boost versions, but they
38− # don't :( maybe one day
39− , boost ? boost152
13+ # fdb 6.0+ support boost 1.6x+, so default to it
14+ , boost ? boost16x
4015 }: stdenv.mkDerivation rec {
4116 name = "foundationdb-${version}";
4217 inherit version;
@@ -48,20 +23,14 @@ let
4823 };
4924
5025 nativeBuildInputs = [ gawk which m4 findutils mono58 ];
51− buildInputs = [ python openjdk libressl boost ];
26+ buildInputs = [ python openjdk libressl_2_6 boost ];
5227
5328 patches =
54− [ # For 5.2+, we need a slightly adjusted patch to fix all the ldflags
55− (if lib.versionAtLeast version "5.2"
56− then ./ldflags.patch
57− else ./ldflags-5.1.patch)
58− ] ++
59− # for 6.0+, we do NOT need to apply this version fix, since we can specify
60− # it ourselves. see configurePhase
61− (lib.optional (!lib.versionAtLeast version "6.0") ./fix-scm-version.patch);
29+ [ ./fix-scm-version.patch
30+ ./ldflags.patch
31+ ];
6232
6333 postPatch = ''
64− # note: this does not do anything for 6.0+
6534 substituteInPlace ./build/scver.mk \
6635 --subst-var-by NIXOS_FDB_VERSION_ID "${rev}" \
6736 --subst-var-by NIXOS_FDB_SCBRANCH "${branch}"
@@ -82,13 +51,7 @@ let
8251 enableParallelBuilding = true;
8352 makeFlags = [ "all" "fdb_c" "fdb_java" "KVRELEASE=1" ];
8453
85− # on 6.0 and later, we can specify all this information manually
86− configurePhase = lib.optionalString (lib.versionAtLeast version "6.0") ''
87− export SOURCE_CONTROL=GIT
88− export SCBRANCH="${branch}"
89− export VERSION_ID="${rev}"
90− '';
91−
54+ configurePhase = ":";
9255 installPhase = ''
9356 mkdir -vp $out/{bin,libexec/plugins} $lib/{lib,share/java} $dev/include/foundationdb
9457
@@ -122,24 +85,45 @@ let
12285 };
12386 };
12487
88+ # hysterical raisins dictate a version of boost this old. however,
89+ # we luckily do not need to build anything, we just need the header
90+ # files.
91+ boost152 = stdenv.mkDerivation rec {
92+ name = "boost-headers-1.52.0";
93+
94+ src = fetchurl {
95+ url = "mirror://sourceforge/boost/boost_1_52_0.tar.bz2";
96+ sha256 = "14mc7gsnnahdjaxbbslzk79rc0d12h1i681cd3srdwr3fzynlar2";
97+ };
98+
99+ configurePhase = ":";
100+ buildPhase = ":";
101+ installPhase = "mkdir -p $out/include && cp -R boost $out/include/";
102+ };
103+
125104in with builtins; {
126105
127− foundationdb51 = makeFdb rec {
106+ foundationdb51 = makeFdb {
128107 version = "5.1.7";
129108 branch = "release-5.1";
109+ rev = "9ad8d02386d4a6a5efecf898df80f2747695c627";
130110 sha256 = "1rc472ih24f9s5g3xmnlp3v62w206ny0pvvw02bzpix2sdrpbp06";
111+ boost = boost152;
131112 };
132113
133114 foundationdb52 = makeFdb rec {
134− version = "5.2.5";
135− branch = "release-5.2";
136− sha256 = "00csr4v9cwl9y8r63p73grc6cvhlqmzcniwrf80i0klxv5asg7q7";
115+ version = "5.2.0pre1488_${substring 0 8 rev}";
116+ branch = "master";
117+ rev = "18f345487ed8d90a5c170d813349fa625cf05b4e";
118+ sha256 = "0mz30fxj6q99cvjzg39s5zm992i6h2l2cb70lc58bdhsz92dz3vc";
119+ boost = boost152;
137120 };
138121
139122 foundationdb60 = makeFdb rec {
140− version = "6.0.0pre2227_${substring 0 8 rev}";
123+ version = "6.0.0pre1636_${substring 0 8 rev}";
141124 branch = "master";
142− rev = "8caa6eaecf1eeec0298fc77db334761b0c1d1523";
143− sha256 = "1q200rpsphl5fzwzp2vk7ifgsnqh95k0xfiicfi1c8253ylnsgll";
125+ rev = "1265a7b6d5e632dd562b3012e70f0727979806bd";
126+ sha256 = "0z1i5bkbszsbn8cc48rlhr29m54n2s0gq3dln0n7f97gf58mi5yf";
144127 };
128+
145129}