nixpkgs/pkgs/development/libraries/wiredtiger/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.9 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool
2015-05-20 04:43:48 +00:00
# Optional Dependencies
, lz4 ? null, snappy ? null, zlib ? null, bzip2 ? null, db ? null
, gperftools ? null, leveldb ? null
2015-04-08 20:02:56 +00:00
}:
2015-05-20 04:43:48 +00:00
let
2021-02-25 16:21:13 +00:00
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
2015-05-20 04:43:48 +00:00
optLz4 = shouldUsePkg lz4;
optSnappy = shouldUsePkg snappy;
optZlib = shouldUsePkg zlib;
optBzip2 = shouldUsePkg bzip2;
optDb = shouldUsePkg db;
optGperftools = shouldUsePkg gperftools;
optLeveldb = shouldUsePkg leveldb;
in
2015-04-08 20:02:56 +00:00
stdenv.mkDerivation rec {
pname = "wiredtiger";
version = "3.2.1";
2015-04-08 20:02:56 +00:00
src = fetchFromGitHub {
repo = "wiredtiger";
owner = "wiredtiger";
rev = version;
sha256 = "04j2zw8b9jym43r682rh4kpdippxx7iw3ry16nxlbybzar9kgk83";
2015-04-08 20:02:56 +00:00
};
nativeBuildInputs = [ automake autoconf libtool ];
2015-05-20 04:43:48 +00:00
buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ];
2015-04-08 20:02:56 +00:00
configureFlags = [
2022-11-27 21:29:17 +00:00
(lib.withFeature false "attach")
(lib.withFeatureAs true "builtins" "")
(lib.enableFeature (optBzip2 != null) "bzip2")
(lib.enableFeature false "diagnostic")
(lib.enableFeature false "java")
(lib.enableFeature (optLeveldb != null) "leveldb")
(lib.enableFeature false "python")
(lib.enableFeature (optSnappy != null) "snappy")
(lib.enableFeature (optLz4 != null) "lz4")
(lib.enableFeature (optGperftools != null) "tcmalloc")
(lib.enableFeature (optZlib != null) "zlib")
(lib.withFeatureAs (optDb != null) "berkeleydb" optDb)
(lib.withFeature false "helium")
2015-04-08 20:02:56 +00:00
];
preConfigure = ''
./autogen.sh
'';
2022-11-27 21:29:17 +00:00
meta = with lib; {
homepage = "http://wiredtiger.com/";
2015-04-08 20:02:56 +00:00
description = "";
license = licenses.gpl2;
2015-04-17 13:32:25 +00:00
platforms = intersectLists platforms.unix platforms.x86_64;
2015-04-08 20:02:56 +00:00
};
}