From 0811f83e3cf5a6a6d1d457556fd62fd01750524a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 27 Nov 2022 22:27:21 +0100 Subject: [PATCH] libdbi-drivers: remove global with lib, add TODO --- .../libraries/libdbi-drivers/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libdbi-drivers/default.nix b/pkgs/development/libraries/libdbi-drivers/default.nix index 79e063826f8b..321c50b61c98 100644 --- a/pkgs/development/libraries/libdbi-drivers/default.nix +++ b/pkgs/development/libraries/libdbi-drivers/default.nix @@ -1,10 +1,10 @@ { lib, stdenv, fetchurl, libdbi +# TODO: migrate away from overriding packages to null , libmysqlclient ? null , sqlite ? null , postgresql ? null }: -with lib; stdenv.mkDerivation rec { pname = "libdbi-drivers"; version = "0.9.0"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"; }; - buildInputs = [ libdbi sqlite postgresql ] ++ optional (libmysqlclient != null) libmysqlclient; + buildInputs = [ libdbi sqlite postgresql ] ++ lib.optional (libmysqlclient != null) libmysqlclient; postPatch = '' sed -i '/SQLITE3_LIBS/ s/-lsqlite/-lsqlite3/' configure; @@ -27,15 +27,15 @@ stdenv.mkDerivation rec { "--enable-libdbi" "--with-dbi-incdir=${libdbi}/include" "--with-dbi-libdir=${libdbi}/lib" - ] ++ optionals (libmysqlclient != null) [ + ] ++ lib.optionals (libmysqlclient != null) [ "--with-mysql" - "--with-mysql-incdir=${getDev libmysqlclient}/include/mysql" + "--with-mysql-incdir=${lib.getDev libmysqlclient}/include/mysql" "--with-mysql-libdir=${libmysqlclient}/lib/mysql" - ] ++ optionals (sqlite != null) [ + ] ++ lib.optionals (sqlite != null) [ "--with-sqlite3" "--with-sqlite3-incdir=${sqlite.dev}/include/sqlite" "--with-sqlite3-libdir=${sqlite.out}/lib/sqlite" - ] ++ optionals (postgresql != null) [ + ] ++ lib.optionals (postgresql != null) [ "--with-pgsql" "--with-pgsql_incdir=${postgresql}/include" "--with-pgsql_libdir=${postgresql.lib}/lib" @@ -54,10 +54,11 @@ stdenv.mkDerivation rec { rm -rf $out/var ''; - meta = { + meta = with lib; { homepage = "http://libdbi-drivers.sourceforge.net/"; description = "Database drivers for libdbi"; platforms = platforms.all; license = licenses.lgpl21; + maintainers = with maintainers; [ ]; }; }