guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

09/10: gnu: Add guile-dbd-mysql.


From: guix-commits
Subject: 09/10: gnu: Add guile-dbd-mysql.
Date: Sun, 3 Oct 2021 10:19:54 -0400 (EDT)

arunisaac pushed a commit to branch master
in repository guix.

commit 2b9e6f152117e11e636ae53c329d0400800b5729
Author: Arun Isaac <arunisaac@systemreboot.net>
AuthorDate: Wed Sep 8 19:55:12 2021 +0530

    gnu: Add guile-dbd-mysql.
    
    * gnu/packages/guile-xyz.scm (guile-dbd-mysql): New variable.
---
 gnu/packages/guile-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 1f6dc30..2796ec4 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1632,6 +1632,39 @@ SQL databases.  This package implements the interface 
for SQLite.")))
 interface to SQL databases.  This package implements the interface for
 PostgreSQL.")))
 
+(define-public guile-dbd-mysql
+  (package
+    (inherit guile-dbi)
+    (name "guile-dbd-mysql")
+    (arguments
+     (substitute-keyword-arguments (package-arguments guile-dbi)
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (replace 'chdir
+             (lambda _
+               ;; The upstream Git repository contains all the code, so change
+               ;; to the directory specific to guile-dbd-mysql.
+               (chdir "guile-dbd-mysql")))
+           (add-after 'chdir 'patch-src
+             (lambda _
+               (substitute* "configure.ac"
+                 (("mariadbclient") "mariadb"))
+               (substitute* "src/guile-dbd-mysql.c"
+                 (("<mariadb/") "<mysql/"))))
+           (delete 'patch-extension-path)))))
+    (inputs
+     `(("mariadb" ,mariadb "dev")
+       ("mariadb" ,mariadb "lib")
+       ("zlib" ,zlib)))
+    (native-inputs
+     `(("guile-dbi" ,guile-dbi)         ; only required for headers
+       ,@(package-native-inputs guile-dbi)))
+    (synopsis "Guile DBI driver for MySQL")
+    (description "@code{guile-dbi} is a library for Guile that provides a
+convenient interface to SQL databases.  This package implements the interface
+for MySQL.")
+    (license license:gpl2+)))
+
 (define-public guile-config
   (package
     (name "guile-config")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]