unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] services: mysql: Add port to configuration
@ 2016-12-11 21:17 Christopher Baines
  2016-12-13 22:55 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Baines @ 2016-12-11 21:17 UTC (permalink / raw)
  To: guix-devel

* gnu/services/databases.scm (<mysql-configuration>): Add port field.
  (mysql-configuration-file): Use the port field when creating the
  configuration file.
---
 gnu/services/databases.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 1eed85542..f7e08e696 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -160,7 +160,8 @@ and stores the database cluster in @var{data-directory}."
 (define-record-type* <mysql-configuration>
   mysql-configuration make-mysql-configuration
   mysql-configuration?
-  (mysql mysql-configuration-mysql (default mariadb)))
+  (mysql mysql-configuration-mysql (default mariadb))
+  (port mysql-configuration-port (default 3306)))
 
 (define %mysql-accounts
   (list (user-group
@@ -175,10 +176,11 @@ and stores the database cluster in @var{data-directory}."
 
 (define mysql-configuration-file
   (match-lambda
-    (($ <mysql-configuration> mysql)
-     (plain-file "my.cnf" "[mysqld]
+    (($ <mysql-configuration> mysql port)
+     (mixed-text-file "my.cnf" "[mysqld]
 datadir=/var/lib/mysql
 socket=/run/mysqld/mysqld.sock
+port=" (number->string port) "
 "))))
 
 (define (%mysql-activation config)
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] services: mysql: Add port to configuration
  2016-12-11 21:17 [PATCH] services: mysql: Add port to configuration Christopher Baines
@ 2016-12-13 22:55 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-12-13 22:55 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

Christopher Baines <mail@cbaines.net> skribis:

> * gnu/services/databases.scm (<mysql-configuration>): Add port field.
>   (mysql-configuration-file): Use the port field when creating the
>   configuration file.

I added a guix.texi item and committed.  Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-13 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-11 21:17 [PATCH] services: mysql: Add port to configuration Christopher Baines
2016-12-13 22:55 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).