2014-01-31 10:25:49 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, cxxSupport ? true
|
|
|
|
, compat185 ? true
|
|
|
|
|
|
|
|
# Options from inherited versions
|
|
|
|
, version, sha256
|
|
|
|
, extraPatches ? [ ]
|
2014-03-25 02:01:24 +01:00
|
|
|
, license ? stdenv.lib.licenses.sleepycat
|
2014-11-17 19:04:59 +01:00
|
|
|
, branch ? null
|
2016-02-07 17:20:07 +01:00
|
|
|
, drvArgs ? {}
|
2014-01-31 10:25:49 +01:00
|
|
|
}:
|
|
|
|
|
2016-02-07 17:20:07 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2014-01-31 10:25:49 +01:00
|
|
|
name = "db-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://download.oracle.com/berkeley-db/${name}.tar.gz";
|
|
|
|
sha256 = sha256;
|
|
|
|
};
|
2014-03-25 02:01:24 +01:00
|
|
|
|
2014-01-31 10:25:49 +01:00
|
|
|
patches = extraPatches;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
|
|
|
|
(if compat185 then "--enable-compat185" else "--disable-compat185")
|
2015-05-27 22:23:23 +02:00
|
|
|
"--enable-dbm"
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 01:46:00 +01:00
|
|
|
(stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic")
|
2014-01-31 10:25:49 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cd build_unix
|
|
|
|
configureScript=../dist/configure
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/docs
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html";
|
|
|
|
description = "Berkeley DB";
|
|
|
|
license = license;
|
|
|
|
platforms = platforms.unix;
|
2014-11-17 19:04:59 +01:00
|
|
|
branch = branch;
|
2014-01-31 10:25:49 +01:00
|
|
|
};
|
2016-02-07 17:20:07 +01:00
|
|
|
} // drvArgs)
|