mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
f9fdf2d402
with structuredAttrs lists will be bash arrays which cannot be exported which will be a issue with some patches and some wrappers like cc-wrapper this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists in env cause a eval failure
34 lines
938 B
Nix
34 lines
938 B
Nix
{ lib, stdenv, fetchurl, readline, libmysqlclient, postgresql, 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 -L${postgresql}/lib"
|
|
configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
|
|
'';
|
|
|
|
buildInputs = [ readline libmysqlclient postgresql sqlite ];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
|
# Needed with GCC 12
|
|
"-std=c++14"
|
|
];
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.isDarwin;
|
|
description = "Extremely lightweight but extensible database access library written in C";
|
|
license = licenses.lgpl21;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|