wiredtiger: 2.5.2 -> 2.6.0
This commit is contained in:
parent
b835d4bade
commit
9687d304fd
@ -1,34 +1,64 @@
|
|||||||
{ stdenv, fetchFromGitHub, automake, autoconf, libtool
|
{ stdenv, fetchFromGitHub, automake, autoconf, libtool
|
||||||
, bzip2, snappy, zlib, db
|
|
||||||
|
# Optional Dependencies
|
||||||
|
, lz4 ? null, snappy ? null, zlib ? null, bzip2 ? null, db ? null
|
||||||
|
, gperftools ? null, leveldb ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
let
|
||||||
|
mkFlag = trueStr: falseStr: cond: name: val:
|
||||||
|
if cond == null then null else
|
||||||
|
"--${if cond != false then trueStr else falseStr}${name}${if val != null && cond != false then "=${val}" else ""}";
|
||||||
|
mkEnable = mkFlag "enable-" "disable-";
|
||||||
|
mkWith = mkFlag "with-" "without-";
|
||||||
|
mkOther = mkFlag "" "" true;
|
||||||
|
|
||||||
|
shouldUsePkg = pkg: if pkg != null && any (x: x == stdenv.system) pkg.meta.platforms then pkg else null;
|
||||||
|
|
||||||
|
optLz4 = shouldUsePkg lz4;
|
||||||
|
optSnappy = shouldUsePkg snappy;
|
||||||
|
optZlib = shouldUsePkg zlib;
|
||||||
|
optBzip2 = shouldUsePkg bzip2;
|
||||||
|
optDb = shouldUsePkg db;
|
||||||
|
optGperftools = shouldUsePkg gperftools;
|
||||||
|
optLeveldb = shouldUsePkg leveldb;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "wiredtiger-${version}";
|
name = "wiredtiger-${version}";
|
||||||
version = "2.5.2";
|
version = "2.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
repo = "wiredtiger";
|
repo = "wiredtiger";
|
||||||
owner = "wiredtiger";
|
owner = "wiredtiger";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1rk26gfs4zpz88mkbdkhz65q4admpgf46x5zsnghl0ndirmnvq3p";
|
sha256 = "0i2r03bpq9xzp5pw7c67kjac5j7mssiawd9id8lqjdbr6c6772cv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ automake autoconf libtool ];
|
nativeBuildInputs = [ automake autoconf libtool ];
|
||||||
buildInputs = [ bzip2 snappy zlib db ];
|
buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-berkeleydb=${db}"
|
(mkWith false "attach" null)
|
||||||
"--enable-bzip2"
|
(mkWith true "builtins" "")
|
||||||
"--enable-leveldb"
|
(mkEnable (optBzip2 != null) "bzip2" null)
|
||||||
"--enable-snappy"
|
(mkEnable false "diagnostic" null)
|
||||||
"--enable-zlib"
|
(mkEnable false "java" null)
|
||||||
|
(mkEnable (optLeveldb != null) "leveldb" null)
|
||||||
|
(mkEnable false "python" null)
|
||||||
|
(mkEnable (optSnappy != null) "snappy" null)
|
||||||
|
(mkEnable (optLz4 != null) "lz4" null)
|
||||||
|
(mkEnable (optGperftools != null) "tcmalloc" null)
|
||||||
|
(mkEnable (optZlib != null) "zlib" null)
|
||||||
|
(mkWith (optDb != null) "berkeleydb" optDb)
|
||||||
|
(mkWith false "helium" null)
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = {
|
||||||
homepage = http://wiredtiger.com/;
|
homepage = http://wiredtiger.com/;
|
||||||
description = "";
|
description = "";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
Loading…
Reference in New Issue
Block a user