Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
readline,
|
|
libmysqlclient,
|
|
libpq,
|
|
sqlite,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) getDev;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "opendbx";
|
|
version = "1.4.6";
|
|
|
|
src = fetchurl {
|
|
url = "https://linuxnetworks.de/opendbx/download/opendbx-${version}.tar.gz";
|
|
sha256 = "0z29h6zx5f3gghkh1a0060w6wr572ci1rl2a3480znf728wa0ii2";
|
|
};
|
|
|
|
preConfigure = ''
|
|
export CPPFLAGS="-I${getDev libmysqlclient}/include/mysql"
|
|
export LDFLAGS="-L${libmysqlclient}/lib/mysql"
|
|
configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
|
|
'';
|
|
|
|
configureFlags = [
|
|
# detection fails when cross-compiling
|
|
"ac_cv_func_malloc_0_nonnull=yes"
|
|
"ac_cv_func_realloc_0_nonnull=yes"
|
|
"ac_cv_func_strtod=yes"
|
|
];
|
|
|
|
buildInputs = [
|
|
readline
|
|
libmysqlclient
|
|
libpq
|
|
sqlite
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
# Needed with GCC 12
|
|
"-std=c++14"
|
|
];
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
description = "Extremely lightweight but extensible database access library written in C";
|
|
mainProgram = "odbx-sql";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|