You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
3.6 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages mysql)
  19. #:use-module (gnu packages)
  20. #:use-module (gnu packages perl)
  21. #:use-module (gnu packages linux)
  22. #:use-module (gnu packages openssl)
  23. #:use-module (gnu packages compression)
  24. #:use-module (gnu packages ncurses)
  25. #:use-module ((guix licenses) #:select (gpl2))
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix build-system gnu))
  29. (define-public mysql
  30. (package
  31. (name "mysql")
  32. (version "5.1.54")
  33. (source (origin
  34. (method url-fetch)
  35. (uri (string-append
  36. "http://downloads.mysql.com/archives/mysql-5.1/mysql-"
  37. version ".tar.gz"))
  38. (sha256
  39. (base32
  40. "07xbnwk7h1xya8s6dw34nrv7ampzag8l0l1szd2pc9zyqkzhydw4"))))
  41. (build-system gnu-build-system)
  42. (inputs
  43. `(("procps" ,procps)
  44. ("openssl" ,openssl)
  45. ("perl" ,perl)
  46. ("zlib" ,zlib)
  47. ("ncurses" ,ncurses)))
  48. (arguments
  49. '(#:modules ((guix build gnu-build-system)
  50. (guix build utils)
  51. (ice-9 ftw)) ; for "rm -rf"
  52. #:phases (alist-cons-after
  53. 'install 'clean-up
  54. (lambda* (#:key outputs #:allow-other-keys)
  55. ;; Remove the 112 MiB of tests that get installed.
  56. (let ((out (assoc-ref outputs "out")))
  57. (define (rm-rf dir)
  58. (file-system-fold (const #t) ; enter?
  59. (lambda (file stat result) ; leaf
  60. (delete-file file))
  61. (const #t) ; down
  62. (lambda (dir stat result) ; up
  63. (rmdir dir))
  64. (const #t)
  65. (lambda (file stat errno result)
  66. (format (current-error-port)
  67. "error: ~a: ~a~%"
  68. file (strerror errno)))
  69. #t
  70. (string-append out "/" dir)))
  71. (rm-rf "mysql-test")
  72. (rm-rf "sql-bench")
  73. ;; Compress the 14 MiB Info file.
  74. (zero?
  75. (system* "gzip" "--best"
  76. (string-append out "/share/info/mysql.info")))))
  77. %standard-phases)))
  78. (home-page "http://www.mysql.com/")
  79. (synopsis "A fast, easy to use, and popular database")
  80. (description
  81. "MySQL is a fast, reliable, and easy to use relational database
  82. management system that supports the standardized Structured Query
  83. Language.")
  84. (license gpl2)))