nixpkgs/pkgs/development/libraries/db/generic.nix

51 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl
, cxxSupport ? true
, compat185 ? true
# Options from inherited versions
, version, sha256
2016-11-13 22:48:52 +01:00
, patchSrc ? "src", extraPatches ? [ ]
, license ? stdenv.lib.licenses.sleepycat
2016-02-07 17:20:07 +01:00
, drvArgs ? {}
}:
2016-02-07 17:20:07 +01:00
stdenv.mkDerivation (rec {
name = "db-${version}";
src = fetchurl {
url = "http://download.oracle.com/berkeley-db/${name}.tar.gz";
sha256 = sha256;
};
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"
(stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic")
];
preConfigure = ''
cd build_unix
configureScript=../dist/configure
'';
postInstall = ''
rm -rf $out/docs
'';
2016-11-13 22:48:52 +01:00
doCheck = true;
checkPhase = ''
make examples_c examples_cxx
'';
meta = with stdenv.lib; {
homepage = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/index.html";
description = "Berkeley DB";
license = license;
platforms = platforms.unix;
};
2016-02-07 17:20:07 +01:00
} // drvArgs)