diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2019-11-20 13:46:38 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-11-26 00:16:54 +0100 |
commit | df81de86836686ac713a375bd647d49b8f8f344d (patch) | |
tree | 912497dff769ed3ab26487a846fd70c7ab1cfd46 /gnu/packages/databases.scm | |
parent | ae8a0184bf5a77f88b95e98d7e042110b082e970 (diff) | |
download | patches-df81de86836686ac713a375bd647d49b8f8f344d.tar patches-df81de86836686ac713a375bd647d49b8f8f344d.tar.gz |
gnu: Add libdbi-drivers.
* gnu/packages/databases.scm (libdbi-drivers): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r-- | gnu/packages/databases.scm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 2ccaae205c..4be5912022 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -3192,3 +3192,71 @@ programmers can leverage the power of multiple databases and multiple simultaneous database connections by using this framework.") (home-page "http://libdbi.sourceforge.net/") (license license:lgpl2.1+))) + +(define-public libdbi-drivers + (package + (name "libdbi-drivers") + (version "0.9.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/libdbi-drivers/" + "libdbi-drivers/libdbi-drivers-" version + "/libdbi-drivers-" version ".tar.gz")) + (sha256 + (base32 + "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3")))) + (build-system gnu-build-system) + (native-inputs + `(("inetutils" ,inetutils) + ("glibc-locales" ,glibc-locales))) + (inputs + `(("libdbi" ,libdbi) + ("mysql" ,mariadb) + ("postgresql" ,postgresql) + ("sqlite" ,sqlite))) + (arguments + `(#:configure-flags + (let ((libdbi (assoc-ref %build-inputs "libdbi")) + (mysql (assoc-ref %build-inputs "mysql")) + (postgresql (assoc-ref %build-inputs "postgresql")) + (sqlite (assoc-ref %build-inputs "sqlite"))) + (list "--disable-docs" + (string-append "--with-dbi-incdir=" libdbi "/include") + (string-append "--with-dbi-libdir=" libdbi "/lib") + "--with-mysql" + (string-append "--with-mysql-incdir=" mysql "/include/mysql") + (string-append "--with-mysql-libdir=" mysql "/lib") + "--with-pgsql" + (string-append "--with-pgsql-incdir=" postgresql "/include") + (string-append "--with-pgsql-libdir=" postgresql "/lib") + "--with-sqlite3" + (string-append "--with-sqlite-incdir=" sqlite "/include") + (string-append "--with-sqlite-libdir=" sqlite "/lib"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "tests/test_mysql.sh" + (("^MYMYSQLD=.*") + (string-append "MYMYSQLD=" + (assoc-ref inputs "mysql") + "/bin/mysqld"))) + #t)) + (add-after 'install 'remove-empty-directories + (lambda* (#:key outputs #:allow-other-keys) + (let ((var (string-append (assoc-ref outputs "out") "/var"))) + (delete-file-recursively var)) + #t))))) + (synopsis "Database drivers for the libdbi framework") + (description + "The @code{libdbi-drivers} library provides the database specific drivers +for the @code{libdbi} framework. + +The drivers officially supported by @code{libdbi} are: +@itemize +@item MySQL, +@item PostgreSQL, +@item SQLite. +@end itemize") + (home-page "http://libdbi-drivers.sourceforge.net/") + (license license:lgpl2.1+))) |