diff options
author | William A. Kennington III <william@wkennington.com> | 2015-05-19 21:43:48 -0700 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2015-05-19 21:43:48 -0700 |
commit | 9687d304fd0b2c08ff92b8bb8a393dec51bb77a9 (patch) | |
tree | 7c3a0314011a0d7c51a21e3ae7c0b4538a8e55a2 /pkgs/development/libraries/wiredtiger | |
parent | b835d4badefd230612cc066296ae3e3f6a36e6fa (diff) | |
download | nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar.gz nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar.bz2 nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar.lz nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar.xz nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.tar.zst nixlib-9687d304fd0b2c08ff92b8bb8a393dec51bb77a9.zip |
wiredtiger: 2.5.2 -> 2.6.0
Diffstat (limited to 'pkgs/development/libraries/wiredtiger')
-rw-r--r-- | pkgs/development/libraries/wiredtiger/default.nix | 50 |
1 files changed, 40 insertions, 10 deletions
diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix index 395a40401531..da4dc9d6bbc3 100644 --- a/pkgs/development/libraries/wiredtiger/default.nix +++ b/pkgs/development/libraries/wiredtiger/default.nix @@ -1,34 +1,64 @@ { 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 { name = "wiredtiger-${version}"; - version = "2.5.2"; + version = "2.6.0"; src = fetchFromGitHub { repo = "wiredtiger"; owner = "wiredtiger"; rev = version; - sha256 = "1rk26gfs4zpz88mkbdkhz65q4admpgf46x5zsnghl0ndirmnvq3p"; + sha256 = "0i2r03bpq9xzp5pw7c67kjac5j7mssiawd9id8lqjdbr6c6772cv"; }; nativeBuildInputs = [ automake autoconf libtool ]; - buildInputs = [ bzip2 snappy zlib db ]; + buildInputs = [ optLz4 optSnappy optZlib optBzip2 optDb optGperftools optLeveldb ]; configureFlags = [ - "--with-berkeleydb=${db}" - "--enable-bzip2" - "--enable-leveldb" - "--enable-snappy" - "--enable-zlib" + (mkWith false "attach" null) + (mkWith true "builtins" "") + (mkEnable (optBzip2 != null) "bzip2" null) + (mkEnable false "diagnostic" null) + (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 = '' ./autogen.sh ''; - meta = with stdenv.lib; { + meta = { homepage = http://wiredtiger.com/; description = ""; license = licenses.gpl2; |