2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, readline, libmysqlclient, postgresql, sqlite }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
let inherit (lib) getDev; in
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
pname = "opendbx";
|
|
|
|
version = "1.4.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-13 20:06:32 +00:00
|
|
|
url = "https://linuxnetworks.de/opendbx/download/opendbx-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0z29h6zx5f3gghkh1a0060w6wr572ci1rl2a3480znf728wa0ii2";
|
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = ''
|
2020-10-16 20:44:37 +00:00
|
|
|
export CPPFLAGS="-I${getDev libmysqlclient}/include/mysql"
|
2020-04-24 23:36:52 +00:00
|
|
|
export LDFLAGS="-L${libmysqlclient}/lib/mysql -L${postgresql}/lib"
|
|
|
|
configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ readline libmysqlclient postgresql sqlite ];
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2023-02-16 17:41:37 +00:00
|
|
|
# Needed with GCC 12
|
|
|
|
"-std=c++14"
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extremely lightweight but extensible database access library written in C";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "odbx-sql";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl21;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|