libdbi-drivers: remove global with lib, add TODO

This commit is contained in:
Sandro Jäckel 2022-11-27 22:27:21 +01:00
parent ceee02670c
commit 0811f83e3c
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,10 +1,10 @@
{ lib, stdenv, fetchurl, libdbi { lib, stdenv, fetchurl, libdbi
# TODO: migrate away from overriding packages to null
, libmysqlclient ? null , libmysqlclient ? null
, sqlite ? null , sqlite ? null
, postgresql ? null , postgresql ? null
}: }:
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libdbi-drivers"; pname = "libdbi-drivers";
version = "0.9.0"; version = "0.9.0";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"; sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3";
}; };
buildInputs = [ libdbi sqlite postgresql ] ++ optional (libmysqlclient != null) libmysqlclient; buildInputs = [ libdbi sqlite postgresql ] ++ lib.optional (libmysqlclient != null) libmysqlclient;
postPatch = '' postPatch = ''
sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure; sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure;
@ -27,15 +27,15 @@ stdenv.mkDerivation rec {
"--enable-libdbi" "--enable-libdbi"
"--with-dbi-incdir=${libdbi}/include" "--with-dbi-incdir=${libdbi}/include"
"--with-dbi-libdir=${libdbi}/lib" "--with-dbi-libdir=${libdbi}/lib"
] ++ optionals (libmysqlclient != null) [ ] ++ lib.optionals (libmysqlclient != null) [
"--with-mysql" "--with-mysql"
"--with-mysql-incdir=${getDev libmysqlclient}/include/mysql" "--with-mysql-incdir=${lib.getDev libmysqlclient}/include/mysql"
"--with-mysql-libdir=${libmysqlclient}/lib/mysql" "--with-mysql-libdir=${libmysqlclient}/lib/mysql"
] ++ optionals (sqlite != null) [ ] ++ lib.optionals (sqlite != null) [
"--with-sqlite3" "--with-sqlite3"
"--with-sqlite3-incdir=${sqlite.dev}/include/sqlite" "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite"
"--with-sqlite3-libdir=${sqlite.out}/lib/sqlite" "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite"
] ++ optionals (postgresql != null) [ ] ++ lib.optionals (postgresql != null) [
"--with-pgsql" "--with-pgsql"
"--with-pgsql_incdir=${postgresql}/include" "--with-pgsql_incdir=${postgresql}/include"
"--with-pgsql_libdir=${postgresql.lib}/lib" "--with-pgsql_libdir=${postgresql.lib}/lib"
@ -54,10 +54,11 @@ stdenv.mkDerivation rec {
rm -rf $out/var rm -rf $out/var
''; '';
meta = { meta = with lib; {
homepage = "http://libdbi-drivers.sourceforge.net/"; homepage = "http://libdbi-drivers.sourceforge.net/";
description = "Database drivers for libdbi"; description = "Database drivers for libdbi";
platforms = platforms.all; platforms = platforms.all;
license = licenses.lgpl21; license = licenses.lgpl21;
maintainers = with maintainers; [ ];
}; };
} }