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.
This commit is contained in:
William A. Kennington III 2014-01-31 03:25:49 -06:00 committed by Bjørn Forsman
parent 68b3fd33a7
commit 99f5d2edb4
16 changed files with 88 additions and 130 deletions

View File

@ -0,0 +1,7 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "4.4.20";
extraPatches = [ ./cygwin-4.4.patch ];
sha256 = "0y9vsq8dkarx1mhhip1vaciz6imbbyv37c1dm8b20l7p064bg2i9";
})

View File

@ -0,0 +1,7 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "4.5.20";
extraPatches = [ ./cygwin-4.5.patch ./register-race-fix.patch ];
sha256 = "0bd81k0qv5i8w5gbddrvld45xi9k1gvmcrfm0393v0lrm37dab7m";
})

View File

@ -0,0 +1,6 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "4.7.25";
sha256 = "0gi667v9cw22c03hddd6xd6374l0pczsd56b7pba25c9sdnxjkzi";
})

View File

@ -0,0 +1,6 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "4.8.30";
sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
})

View File

@ -1,32 +1,6 @@
{ stdenv, fetchurl
, cxxSupport ? true
}:
{ stdenv, fetchurl, ... } @ args:
stdenv.mkDerivation rec {
name = "db-5.3.28";
src = fetchurl {
url = "http://download.oracle.com/berkeley-db/${name}.tar.gz";
sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
};
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
];
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 = "Berkeley Database License";
platforms = platforms.unix;
};
}
import ./generic.nix (args // rec {
version = "5.3.28";
sha256 = "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0";
})

View File

@ -0,0 +1,7 @@
{ stdenv, fetchurl, ... } @ args:
import ./generic.nix (args // rec {
version = "6.0.20";
sha256 = "00r2aaglq625y8r9xd5vw2y070plp88f1mb2gbq3kqsl7128lsl0";
license = stdenv.lib.licenses.agpl3;
})

View File

@ -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;
};
}

View File

@ -1,12 +0,0 @@
source $stdenv/setup
preConfigure() {
cd build_unix
configureScript=../dist/configure
}
postInstall() {
rm -rf $out/docs
}
genericBuild

View File

@ -1,22 +0,0 @@
{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}:
stdenv.mkDerivation {
name = "db4-4.4.20";
builder = ./builder.sh;
src = fetchurl {
urls = [
http://download.oracle.com/berkeley-db/db-4.4.20.NC.tar.gz
http://tarballs.nixos.org/db-4.4.20.NC.tar.gz
];
md5 = "afd9243ea353bbaa04421488d3b37900";
};
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")
];
patches = [ ./cygwin-4.4.patch ];
}

View File

@ -1,19 +0,0 @@
{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}:
stdenv.mkDerivation {
name = "db4-4.5.20";
builder = ./builder.sh;
src = fetchurl {
url = http://download-east.oracle.com/berkeley-db/db-4.5.20.tar.gz;
md5 = "b0f1c777708cb8e9d37fb47e7ed3312d";
};
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")
];
patches = [./cygwin-4.5.patch ./register-race-fix.patch];
}

View File

@ -1,18 +0,0 @@
{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}:
stdenv.mkDerivation {
name = "db4-4.7.25";
builder = ./builder.sh;
src = fetchurl {
url = http://download-east.oracle.com/berkeley-db/db-4.7.25.tar.gz;
sha256 = "0gi667v9cw22c03hddd6xd6374l0pczsd56b7pba25c9sdnxjkzi";
};
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")
];
}

View File

@ -1,18 +0,0 @@
{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}:
stdenv.mkDerivation {
name = "db4-4.8.30";
builder = ./builder.sh;
src = fetchurl {
url = http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz;
sha256 = "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0";
};
configureFlags = [
(if cxxSupport then "--enable-cxx" else "--disable-cxx")
(if compat185 then "--enable-compat185" else "--disable-compat185")
];
}

View File

@ -3997,19 +3997,18 @@ let
cyrus_sasl = callPackage ../development/libraries/cyrus-sasl { };
# Make bdb5 the default as it is the last release under the custom
# bsd-like license
db = db5;
db4 = db48;
db44 = callPackage ../development/libraries/db4/db4-4.4.nix { };
db45 = callPackage ../development/libraries/db4/db4-4.5.nix { };
db47 = callPackage ../development/libraries/db4/db4-4.7.nix { };
db48 = callPackage ../development/libraries/db4/db4-4.8.nix { };
db44 = callPackage ../development/libraries/db/db-4.4.nix { };
db45 = callPackage ../development/libraries/db/db-4.5.nix { };
db47 = callPackage ../development/libraries/db/db-4.7.nix { };
db48 = callPackage ../development/libraries/db/db-4.8.nix { };
db5 = db53;
db53 = callPackage ../development/libraries/db/db-5.3.nix { };
db6 = db60;
db60 = callPackage ../development/libraries/db/db-6.0.nix { };
dbus = callPackage ../development/libraries/dbus { };
dbus_cplusplus = callPackage ../development/libraries/dbus-cplusplus { };