libdbi-drivers: 0.8.3-1 -> 0.9.0
This commit is contained in:
parent
c56383e448
commit
15d3ec0db0
@ -1,31 +1,61 @@
|
|||||||
{ stdenv, fetchurl, libdbi, mysql ? null, sqlite ? null }:
|
{ stdenv, fetchurl, libdbi
|
||||||
|
, mysql ? null, sqlite ? null, postgresql ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libdbi-drivers-0.8.3-1";
|
name = "libdbi-drivers-0.9.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/libdbi-drivers/${name}.tar.gz";
|
url = "mirror://sourceforge/libdbi-drivers/${name}.tar.gz";
|
||||||
sha256 = "0wng59xnq8jjyp6f3bfjrhjvqrswamrjykdnxq6rqxnfk11r9faa";
|
sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libdbi mysql sqlite ];
|
buildInputs = [ libdbi mysql sqlite postgresql ];
|
||||||
|
|
||||||
configureFlags =
|
postPatch = ''
|
||||||
[ "--disable-docs"
|
sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
|
||||||
"--enable-libdbi"
|
'';
|
||||||
"--with-dbi-incdir=${libdbi}/include"
|
|
||||||
"--with-dbi-libdir=${libdbi}/lib"
|
configureFlags = [
|
||||||
] ++ stdenv.lib.optionals (mysql != null)
|
"--sysconfdir=/etc"
|
||||||
[ "--with-mysql"
|
"--localstatedir=/var"
|
||||||
"--with-mysql-incdir=${mysql}/include/mysql"
|
"--disable-docs"
|
||||||
"--with-mysql-libdir=${mysql}/lib/mysql"
|
"--enable-libdbi"
|
||||||
] ++ stdenv.lib.optionals (sqlite != null)
|
"--with-dbi-incdir=${libdbi}/include"
|
||||||
[ "--with-sqlite3"
|
"--with-dbi-libdir=${libdbi}/lib"
|
||||||
"--with-sqlite3-incdir=${sqlite}/include/sqlite"
|
] ++ optionals (mysql != null) [
|
||||||
"--with-sqlite3-libdir=${sqlite}/lib/sqlite"
|
"--with-mysql"
|
||||||
];
|
"--with-mysql-incdir=${mysql}/include/mysql"
|
||||||
|
"--with-mysql-libdir=${mysql}/lib/mysql"
|
||||||
|
] ++ optionals (postgresql != null) [
|
||||||
|
"--with-pgsql"
|
||||||
|
"--with-pgsql_incdir=${postgresql}/include"
|
||||||
|
"--with-pgsql_libdir=${postgresql}/lib"
|
||||||
|
] ++ optionals (sqlite != null) [
|
||||||
|
"--with-sqlite3"
|
||||||
|
"--with-sqlite3-incdir=${sqlite}/include/sqlite"
|
||||||
|
"--with-sqlite3-libdir=${sqlite}/lib/sqlite"
|
||||||
|
];
|
||||||
|
|
||||||
|
installFlags = [ "DESTDIR=\${out}" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mv $out/$out/* $out
|
||||||
|
DIR=$out/$out
|
||||||
|
while rmdir $DIR 2>/dev/null; do
|
||||||
|
DIR="$(dirname "$DIR")"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Remove the unneeded var/lib directories
|
||||||
|
rm -rf $out/var
|
||||||
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
homepage = http://libdbi-drivers.sourceforge.net/;
|
||||||
description = "Database drivers for libdbi";
|
description = "Database drivers for libdbi";
|
||||||
|
platforms = platforms.all;
|
||||||
|
license = licenses.lgpl21;
|
||||||
|
maintainers = with maintainers; [ wkennington ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user