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.

75 lines
3.0 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 Roel Janssen <roel@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 (gn packages bioinformatics)
  19. #:use-module ((guix licenses) #:prefix license:)
  20. #:use-module (guix packages)
  21. #:use-module (guix utils)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system gnu)
  24. #:use-module (gnu packages)
  25. #:use-module (gnu packages perl)
  26. #:use-module (gnu packages pkg-config)
  27. #:use-module (gnu packages python))
  28. (define-public mongodb
  29. (package
  30. (name "mongodb")
  31. (version "3.3.3")
  32. (source (origin
  33. (method url-fetch)
  34. (uri (string-append "https://github.com/mongodb/mongo/archive/r"
  35. version ".tar.gz"))
  36. (file-name (string-append name "-" version ".tar.gz"))
  37. (sha256
  38. (base32 "01v16j8xbry7m7apwlhiqhgx3zyyk2kadyk2sr9m6k20wnh5j24y"))
  39. (patches (list (search-patch "mongodb-add-version-file.patch")))))
  40. (build-system gnu-build-system)
  41. (native-inputs
  42. `(("scons" ,scons)
  43. ("python" ,python-2)
  44. ("perl" ,perl)))
  45. (arguments
  46. `(#:tests? #f ; There is no 'check' target.
  47. #:phases
  48. (modify-phases %standard-phases
  49. (delete 'configure) ; There is no configure phase
  50. (add-after 'unpack 'scons-propagate-environment
  51. (lambda _
  52. ;; Modify the SConstruct file to arrange for
  53. ;; environment variables to be propagated.
  54. (substitute* "SConstruct"
  55. (("^env = Environment\\(")
  56. "env = Environment(ENV=os.environ, "))))
  57. (replace 'build
  58. (lambda _
  59. (zero? (system* "scons" "mongod" "mongo" "mongos"))))
  60. (replace 'install
  61. (lambda _
  62. (let ((bin (string-append (assoc-ref %outputs "out") "/bin")))
  63. (install-file "mongod" bin)
  64. (install-file "mongos" bin)
  65. (install-file "mongo" bin)))))))
  66. (home-page "https://www.mongodb.org/")
  67. (synopsis "High performance and high availability document database")
  68. (description "Mongo is a high-performance, high availability,
  69. schema-free document-oriented database. A key goal of MongoDB is to bridge
  70. the gap between key/value stores (which are fast and highly scalable) and
  71. traditional RDBMS systems (which are deep in functionality).")
  72. (license (list agpl3 asl2.0))))