2007-12-01 16:20:23 +00:00
|
|
|
args : with args;
|
2008-11-04 21:24:10 +00:00
|
|
|
let localDefs = builderDefs.passthru.function {
|
2007-12-01 16:20:23 +00:00
|
|
|
src = /* put a fetchurl here */
|
|
|
|
fetchurl {
|
|
|
|
url = mirror://sourceforge/libdbi-drivers/libdbi-drivers-0.8.2-1.tar.gz;
|
|
|
|
sha256 = "1bflwl1k3rf1h8clx3zv5pxnm5hbhq6izikv0phkss3qxkjm61ap";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [libdbi]
|
|
|
|
++(if args ? mysql then [args.mysql] else [])
|
|
|
|
++(if args ? sqlite then [args.sqlite] else [])
|
|
|
|
;
|
|
|
|
configureFlags = [
|
|
|
|
" --enable-libdbi "
|
|
|
|
" --with-dbi-incdir=${libdbi}/include "
|
|
|
|
" --with-dbi-libdir=${libdbi}/lib "
|
|
|
|
]
|
|
|
|
++ (if args ? mysql then [
|
|
|
|
" --with-mysql "
|
2008-08-14 22:18:44 +00:00
|
|
|
" --with-mysql-incdir=${args.mysql}/include/mysql "
|
|
|
|
" --with-mysql-libdir=${args.mysql}/lib/mysql "
|
2007-12-01 16:20:23 +00:00
|
|
|
] else [])
|
|
|
|
++ (if args ? sqlite then [
|
|
|
|
" --with-sqlite "
|
2008-08-14 22:18:44 +00:00
|
|
|
" --with-sqlite-incdir=${args.sqlite}/include/sqlite "
|
|
|
|
" --with-sqlite-libdir=${args.sqlite}/lib/sqlite "
|
2007-12-01 16:20:23 +00:00
|
|
|
] else [])
|
|
|
|
;
|
2008-08-19 05:54:09 +00:00
|
|
|
};
|
2008-01-18 12:36:56 +00:00
|
|
|
in with localDefs;
|
2007-12-01 16:20:23 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2009-11-18 09:39:59 +00:00
|
|
|
name = "libdbi-0.8.2-1";
|
2007-12-01 16:20:23 +00:00
|
|
|
builder = writeScript (name + "-builder")
|
2008-01-18 12:36:56 +00:00
|
|
|
(textClosure localDefs [doConfigure doMakeInstall doForceShare doPropagate]);
|
2007-12-01 16:20:23 +00:00
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "DB independent interface to DB; DB drivers (mysql only for now)";
|
2008-03-02 18:49:31 +00:00
|
|
|
inherit src;
|
2007-12-01 16:20:23 +00:00
|
|
|
};
|
|
|
|
}
|