libgda: Add optional mysql and postgresql support
This commit is contained in:
parent
f027e82e76
commit
55d2daaf31
@ -1,4 +1,10 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, itstool, libxml2, gtk3, openssl }:
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, intltool, itstool, libxml2, gtk3, openssl
|
||||||
|
, mysqlSupport ? false, mysql ? null
|
||||||
|
, postgresSupport ? false, postgresql ? null
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert mysqlSupport -> mysql != null;
|
||||||
|
assert postgresSupport -> postgresql != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
inherit (import ./src.nix fetchurl) name src;
|
inherit (import ./src.nix fetchurl) name src;
|
||||||
@ -11,16 +17,18 @@ stdenv.mkDerivation rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = with stdenv.lib; [ "--enable-gi-system-install=no" ]
|
||||||
"--enable-gi-system-install=no"
|
++ (optional (mysqlSupport) "--with-mysql=yes")
|
||||||
];
|
++ (optional (postgresSupport) "--with-postgres=yes");
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig intltool itstool libxml2 ];
|
||||||
buildInputs = [ intltool itstool libxml2 gtk3 openssl ];
|
buildInputs = with stdenv.lib; [ gtk3 openssl ]
|
||||||
|
++ optional (mysqlSupport) mysql.connector-c
|
||||||
|
++ optional (postgresSupport) postgresql;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Database access library";
|
description = "Database access library";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user