From: 宋文武 <iyzsong@gmail.com>
To: guix-devel@gnu.org
Subject: [PATCH 3/3] gnu: Add MariaDB.
Date: Fri, 17 Apr 2015 15:24:58 +0800 [thread overview]
Message-ID: <1429255498-32458-3-git-send-email-iyzsong@gmail.com> (raw)
In-Reply-To: <1429255498-32458-1-git-send-email-iyzsong@gmail.com>
* gnu/packages/database.scm (mariadb): New variable.
---
gnu/packages/databases.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ee97977..5d64757 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -5,6 +5,7 @@
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +37,10 @@
#:use-module (gnu packages curl)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages python)
+ #:use-module (gnu packages pcre)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages bison)
+ #:use-module (gnu packages jemalloc)
#:use-module ((guix licenses)
#:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
bsd-2 public-domain))
@@ -43,6 +48,7 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
+ #:use-module (guix build-system cmake)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match))
@@ -149,6 +155,77 @@ management system that supports the standardized Structured Query
Language.")
(license gpl2)))
+(define-public mariadb
+ (package
+ (name "mariadb")
+ (version "10.0.17")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://downloads.mariadb.org/f/"
+ name "-" version "/source/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "04ckq67qgkghh7yzrbzwidk7wn7yjml15gzj2c5p1hs2k7lr9lww"))))
+ (build-system cmake-build-system)
+ (outputs '("out" "test"))
+ (arguments
+ '(#:configure-flags
+ '("-DBUILD_CONFIG=mysql_release"
+ "-DDEFAULT_CHARSET=utf8"
+ "-DDEFAULT_COLLATION=utf8_general_ci"
+ "-DMYSQL_DATADIR=/var/lib/mysql"
+ "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+ "-DINSTALL_INFODIR=share/mysql/docs"
+ "-DINSTALL_MANDIR=share/man"
+ "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
+ "-DINSTALL_SCRIPTDIR=bin"
+ "-DINSTALL_INCLUDEDIR=include/mysql"
+ "-DINSTALL_DOCREADMEDIR=share/mysql/docs"
+ "-DINSTALL_SUPPORTFILESDIR=share/mysql/support-files"
+ "-DINSTALL_MYSQLSHAREDIR=share/mysql"
+ "-DINSTALL_DOCDIR=share/mysql/docs"
+ "-DINSTALL_SHAREDIR=share/mysql")
+ #:phases
+ (alist-cons-before
+ 'configure 'pre-configure
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ ;; XXX: libstdc++.so lacks RUNPATH for libgcc_s.so.
+ (setenv "LDFLAGS" "-lgcc_s")
+ #t)
+ (alist-cons-after
+ 'install 'post-install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (test (assoc-ref outputs "test")))
+ (substitute* (string-append out "/bin/mysql_install_db")
+ (("basedir=\"\"")
+ (string-append "basedir=\"" out "\"")))
+ ;; Install testing data to the 'test' output.
+ (mkdir-p test)
+ (system* "mv" (string-append out "/data") test)
+ (system* "mv" (string-append out "/mysql-test") test)
+ (system* "mv" (string-append out "/sql-bench") test)))
+ %standard-phases))))
+ (native-inputs
+ `(("bison" ,bison)
+ ("perl" ,perl)))
+ (inputs
+ `(("jemalloc" ,jemalloc)
+ ("libaio" ,libaio)
+ ("libxml2" ,libxml2)
+ ("ncurses" ,ncurses)
+ ("openssl" ,openssl)
+ ("pcre" ,pcre)
+ ("zlib" ,zlib)))
+ (home-page "https://mariadb.org/")
+ (synopsis "SQL database server")
+ (description
+ "MariaDB is a multi-user and multi-threaded SQL database server, designed
+as a drop-in replacement of MySQL.")
+ (license gpl2)))
+
(define-public postgresql
(package
(name "postgresql")
--
2.2.1
next prev parent reply other threads:[~2015-04-17 7:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-17 7:24 [PATCH 1/3] gnu: Add jemalloc 宋文武
2015-04-17 7:24 ` [PATCH 2/3] gnu: Add libaio 宋文武
2015-04-17 7:24 ` 宋文武 [this message]
2015-04-17 11:33 ` [PATCH 3/3] gnu: Add MariaDB David Thompson
2015-04-17 11:43 ` Taylan Ulrich Bayırlı/Kammer
2015-04-17 13:37 ` Ludovic Courtès
2015-04-17 12:00 ` Ludovic Courtès
2015-04-17 12:07 ` Ludovic Courtès
2015-04-17 13:02 ` 宋文武
2015-04-17 13:40 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1429255498-32458-3-git-send-email-iyzsong@gmail.com \
--to=iyzsong@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).