From b874f68d80ee672395783e4042952246013fc768 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 Apr 2004 09:34:43 +0000 Subject: [PATCH] * Remove docs/ after build. svn path=/nixpkgs/trunk/; revision=912 --- pkgs/development/libraries/db4/builder.sh | 20 +++++++++++++------- pkgs/development/libraries/db4/default.nix | 8 +++++++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/db4/builder.sh b/pkgs/development/libraries/db4/builder.sh index 8b938d160fe8..8c86e426ba5e 100644 --- a/pkgs/development/libraries/db4/builder.sh +++ b/pkgs/development/libraries/db4/builder.sh @@ -1,8 +1,14 @@ -. $stdenv/setup || exit 1 +. $stdenv/setup -tar xvfz $src || exit 1 -cd db-*/build_unix || exit 1 -../dist/configure --prefix=$out --enable-cxx --enable-compat185 || exit 1 -make || exit 1 -make install || exit 1 -rm -rf $out/doc || exit 1 +preConfigure() { + cd build_unix + configureScript=../dist/configure +} +preConfigure=preConfigure + +postInstall() { + rm -rf $out/docs +} +postInstall=postInstall + +genericBuild diff --git a/pkgs/development/libraries/db4/default.nix b/pkgs/development/libraries/db4/default.nix index 9486ec8ba6db..10a6781dc2e2 100644 --- a/pkgs/development/libraries/db4/default.nix +++ b/pkgs/development/libraries/db4/default.nix @@ -1,8 +1,14 @@ -{stdenv, fetchurl}: stdenv.mkDerivation { +{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}: + +stdenv.mkDerivation { name = "db4-4.2.52"; builder = ./builder.sh; src = fetchurl { url = http://www.sleepycat.com/update/snapshot/db-4.2.52.tar.gz; md5 = "cbc77517c9278cdb47613ce8cb55779f"; }; + configureFlags = [ + (if cxxSupport then "--enable-cxx" else "--disable-cxx") + (if cxxSupport then "--enable-compat185" else "--disable-compat185") + ]; }