diff options
author | William A. Kennington III <william@wkennington.com> | 2014-01-31 03:25:49 -0600 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-02-15 12:03:01 +0100 |
commit | 99f5d2edb423194540a2bf83365e7b78b1ffccc9 (patch) | |
tree | 6f0b7b5a75c6d02b9b8599ae5e1cf1b512af6d7f /pkgs/development/libraries/db/generic.nix | |
parent | 68b3fd33a78ce51268f0eec31386a056d760ffc1 (diff) |
db: Reorganize Berkeley Database Packaging
Currently, the berkeley databases resuses a lot of the same code for the expressions of each version. This consolidates all of the build routines similar to that of the linux kernel. This patch also adds version 6 of BDB.
Diffstat (limited to 'pkgs/development/libraries/db/generic.nix')
-rw-r--r-- | pkgs/development/libraries/db/generic.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix new file mode 100644 index 0000000000000..de9fb27b4ec2b --- /dev/null +++ b/pkgs/development/libraries/db/generic.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl +, cxxSupport ? true +, compat185 ? true + +# Options from inherited versions +, version, sha256 +, extraPatches ? [ ] +, license ? "Berkeley Database License" +}: + +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") + ]; + + 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; + }; +} |