1 { lib, stdenv, fetchFromGitHub, automake, autoconf, libtool
3 # Optional Dependencies
4 , lz4 ? null, snappy ? null, zlib ? null, bzip2 ? null, db ? null
5 , gperftools ? null, leveldb ? null
9 shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
11 optLz4 = shouldUsePkg lz4;
12 optSnappy = shouldUsePkg snappy;
13 optZlib = shouldUsePkg zlib;
14 optBzip2 = shouldUsePkg bzip2;
15 optDb = shouldUsePkg db;
16 optGperftools = shouldUsePkg gperftools;
17 optLeveldb = shouldUsePkg leveldb;
19 stdenv.mkDerivation rec {
23 src = fetchFromGitHub {
27 sha256 = "04j2zw8b9jym43r682rh4kpdippxx7iw3ry16nxlbybzar9kgk83";
30 nativeBuildInputs = [ automake autoconf libtool ];
31 buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ];
34 (lib.withFeature false "attach")
35 (lib.withFeatureAs true "builtins" "")
36 (lib.enableFeature (optBzip2 != null) "bzip2")
37 (lib.enableFeature false "diagnostic")
38 (lib.enableFeature false "java")
39 (lib.enableFeature (optLeveldb != null) "leveldb")
40 (lib.enableFeature false "python")
41 (lib.enableFeature (optSnappy != null) "snappy")
42 (lib.enableFeature (optLz4 != null) "lz4")
43 (lib.enableFeature (optGperftools != null) "tcmalloc")
44 (lib.enableFeature (optZlib != null) "zlib")
45 (lib.withFeatureAs (optDb != null) "berkeleydb" optDb)
46 (lib.withFeature false "helium")
54 homepage = "http://wiredtiger.com/";
56 license = licenses.gpl2;
57 platforms = intersectLists platforms.unix platforms.x86_64;