about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/opendbx
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/opendbx')
-rw-r--r--nixpkgs/pkgs/development/libraries/opendbx/default.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/opendbx/default.nix b/nixpkgs/pkgs/development/libraries/opendbx/default.nix
new file mode 100644
index 000000000000..f954aaf72457
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/opendbx/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, readline, mysql, postgresql, sqlite }:
+
+stdenv.mkDerivation rec {
+  name = "opendbx-1.4.6";
+
+  src = fetchurl {
+    url = "https://linuxnetworks.de/opendbx/download/${name}.tar.gz";
+    sha256 = "0z29h6zx5f3gghkh1a0060w6wr572ci1rl2a3480znf728wa0ii2";
+  };
+
+  preConfigure = ''
+    export CPPFLAGS="-I${mysql.connector-c}/include/mysql"
+    export LDFLAGS="-L${mysql.connector-c}/lib/mysql -L${postgresql}/lib"
+    configureFlagsArray=(--with-backends="mysql pgsql sqlite3")
+  '';
+
+  buildInputs = [ readline mysql.connector-c postgresql sqlite ];
+
+  meta = with stdenv.lib; {
+    description = "Extremely lightweight but extensible database access library written in C";
+    license = licenses.lgpl21;
+    platforms = platforms.all;
+  };
+}