From 599a3aa11183bee3a49d53d87afcc9fd7f0e0685 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Sep 2021 18:06:26 +0300 Subject: braker almost ready --- gn/packages/databases.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'gn/packages/databases.scm') diff --git a/gn/packages/databases.scm b/gn/packages/databases.scm index 93280c2..9c4a109 100644 --- a/gn/packages/databases.scm +++ b/gn/packages/databases.scm @@ -2,6 +2,7 @@ #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -136,3 +137,57 @@ (inputs `(("zlib" ,zlib) ,@(package-inputs base)))))) + +(define-public mysql++ + (package + (name "mysql++") + (version "3.3.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://tangentsoft.com/mysqlpp/releases" + "/mysql++-" version ".tar.gz")) + (sha256 + (base32 + "1kz7l1ngk649cpp2h1cnyqan9px8d50r0dk7kngwrhkcam3br724")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-mysql-include=" + (assoc-ref %build-inputs "mariadb:dev")) + (string-append "--with-mysql-lib=" + (assoc-ref %build-inputs "mariadb:lib"))) + #:phases + (modify-phases %standard-phases + ;; It is unclear how to run the test suite so we just invoke the + ;; compiled binaries which start with 'test_*'. + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "LD_PRELOAD" "./libmysqlpp.so.3") + (and + (invoke "./test_array_index") + (invoke "./test_cpool") + (invoke "./test_datetime") + (invoke "./test_insertpolicy") + (invoke "./test_inttypes") + (invoke "./test_manip") + (invoke "./test_null_comparison") + (invoke "./test_qssqls") + (invoke "./test_qstream") + (invoke "./test_query_copy") + (invoke "./test_sqlstream") + (invoke "./test_ssqls2") + (invoke "./test_string") + ;(invoke "./test_tcp") ; Requires TCP connection. + (invoke "./test_uds") + (invoke "./test_wnp"))) + #t))))) + (inputs + `(("mariadb:dev" ,mariadb "dev") + ("mariadb:lib" ,mariadb "lib"))) + (home-page "https://tangentsoft.net/mysqlpp/") + (synopsis "MySQL C++ library bindings") + (description "MySQL++ is a complex C++ API for MySQL. The goal of this API +is to make working with Queries as easy as working with other STL containers.") + (license license:lgpl2.1+))) -- cgit v1.2.3