2014-01-31 09:25:49 +00:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, cxxSupport ? true
|
|
|
|
, compat185 ? true
|
2016-11-16 21:22:10 +00:00
|
|
|
, dbmSupport ? false
|
2014-01-31 09:25:49 +00:00
|
|
|
|
|
|
|
# Options from inherited versions
|
|
|
|
, version, sha256
|
2018-07-21 01:44:44 +01:00
|
|
|
, extraPatches ? [ ]
|
2014-03-25 01:01:24 +00:00
|
|
|
, license ? stdenv.lib.licenses.sleepycat
|
2016-02-07 16:20:07 +00:00
|
|
|
, drvArgs ? {}
|
2014-01-31 09:25:49 +00:00
|
|
|
}:
|
|
|
|
|
2016-02-07 16:20:07 +00:00
|
|
|
stdenv.mkDerivation (rec {
|
2014-01-31 09:25:49 +00:00
|
|
|
name = "db-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 19:43:35 +01:00
|
|
|
url = "https://download.oracle.com/berkeley-db/${name}.tar.gz";
|
2014-01-31 09:25:49 +00:00
|
|
|
sha256 = sha256;
|
|
|
|
};
|
2014-03-25 01:01:24 +00:00
|
|
|
|
2014-01-31 09:25:49 +00:00
|
|
|
patches = extraPatches;
|
|
|
|
|
2018-05-22 14:47:28 +01:00
|
|
|
outputs = [ "bin" "out" "dev" ];
|
2018-04-16 13:10:42 +01:00
|
|
|
|
2016-11-16 21:22:10 +00:00
|
|
|
configureFlags =
|
|
|
|
[
|
|
|
|
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
|
|
|
|
(if compat185 then "--enable-compat185" else "--disable-compat185")
|
|
|
|
]
|
|
|
|
++ stdenv.lib.optional dbmSupport "--enable-dbm"
|
|
|
|
++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
|
2014-01-31 09:25:49 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd build_unix
|
|
|
|
configureScript=../dist/configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/docs
|
|
|
|
'';
|
|
|
|
|
2016-11-13 21:48:52 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
make examples_c examples_cxx
|
|
|
|
'';
|
|
|
|
|
2014-01-31 09:25:49 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html;
|
2014-01-31 09:25:49 +00:00
|
|
|
description = "Berkeley DB";
|
|
|
|
license = license;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
2016-02-07 16:20:07 +00:00
|
|
|
} // drvArgs)
|