summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/local.mk3
-rw-r--r--gnu/packages/databases.scm64
-rw-r--r--gnu/packages/python.scm861
-rw-r--r--gnu/packages/rabbitmq.scm93
-rw-r--r--gnu/packages/terraform.scm160
-rw-r--r--gnu/services/databases.scm119
-rw-r--r--gnu/services/message-broker.scm114
-rw-r--r--gnu/system.scm59
-rw-r--r--gnu/system/linux-container.scm46
-rw-r--r--gnu/tests.scm12
-rw-r--r--gnu/tests/message-broker.scm86
-rw-r--r--guix/build/go-build-system.scm7
-rw-r--r--guix/docker.scm2
-rw-r--r--guix/import/github.scm57
-rw-r--r--guix/scripts/system.scm18
15 files changed, 1637 insertions, 64 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index a596bbe7a0..76b0d7df9a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -369,6 +369,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/toys.scm \
%D%/packages/tryton.scm \
%D%/packages/qt.scm \
+ %D%/packages/rabbitmq.scm \
%D%/packages/ragel.scm \
%D%/packages/rails.scm \
%D%/packages/ratpoison.scm \
@@ -489,6 +490,7 @@ GNU_SYSTEM_MODULES = \
%D%/services/virtualization.scm \
%D%/services/mail.scm \
%D%/services/mcron.scm \
+ %D%/services/message-broker.scm \
%D%/services/messaging.scm \
%D%/services/monitoring.scm \
%D%/services/networking.scm \
@@ -544,6 +546,7 @@ GNU_SYSTEM_MODULES = \
%D%/tests/nfs.scm \
%D%/tests/install.scm \
%D%/tests/mail.scm \
+ %D%/tests/message-broker.scm \
%D%/tests/messaging.scm \
%D%/tests/networking.scm \
%D%/tests/rsync.scm \
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 07c6006c3b..4e4425b729 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -71,6 +71,7 @@
#:use-module (gnu packages guile)
#:use-module (gnu packages time)
#:use-module (gnu packages golang)
+ #:use-module (gnu packages java)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages language)
#:use-module (gnu packages libevent)
@@ -360,6 +361,69 @@ ElasticSearch server")
(home-page "https://github.com/patientslikeme/es_dump_restore")
(license license:expat)))
+(define-public elasticsearch-2.4.6
+ (package
+ (name "elasticsearch")
+ (version "2.4.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0vzw9kpyyyv3f1m5sy9zara6shc7xkgi5xm5qbzvfywijavlnzjz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("jre" ,icedtea)
+ ("coreutils" ,coreutils)
+ ("inetutils" ,inetutils)
+ ("util-linux" ,util-linux)
+ ("grep" ,grep)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'check)
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each
+ (lambda (dir)
+ (copy-recursively dir (string-append out "/" dir)
+ #:log (%make-void-port "w")))
+ '("bin" "config" "lib" "modules"))
+ (for-each
+ (lambda (dir)
+ (mkdir (string-append out "/" dir)))
+ '("plugins"))
+ (for-each
+ delete-file
+ (find-files
+ (string-append out "/lib")
+ (lambda (name stat)
+ (or (string-contains name "freebsd")
+ (string-contains name "solaris")))))
+ (wrap-program
+ (string-append out "/bin/elasticsearch")
+ `("PATH" = (,(string-append (assoc-ref inputs "util-linux")
+ "/bin")
+ ,(string-append (assoc-ref inputs "coreutils")
+ "/bin")
+ ,(string-append (assoc-ref inputs "inetutils")
+ "/bin")
+ ,(string-append (assoc-ref inputs "grep")
+ "/bin")))
+ `("JAVA_HOME" = (,(assoc-ref inputs "jre"))))
+ #t))))))
+ (home-page "")
+ (synopsis "")
+ (description "")
+ (license "")))
+
+(define-public elasticsearch elasticsearch-2.4.6)
+
(define-public leveldb
(package
(name "leveldb")
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9ef0654cb8..6972e79081 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6051,9 +6051,10 @@ PEP8_PLUGIN('break_before_binary_operator'),"))
(string-append (getcwd) "/build/lib:"
(getenv "PYTHONPATH")))
(zero? (system* "py.test" "-v")))))))
+ (propagated-inputs
+ `(("python-flake8" ,python-flake8)))
(native-inputs
- `(("python-flake8" ,python-flake8)
- ("python-mock" ,python-mock)
+ `(("python-mock" ,python-mock)
("python-pep8" ,python-pep8)
("python-pycodestyle" ,python-pycodestyle)
("python-pytest" ,python-pytest)))
@@ -14997,3 +14998,859 @@ RFC 8265 and RFC 8266.")
(description "Simple decorator to set attributes of target function or
class in a @acronym{DRY, Don't Repeat Yourself} way.")
(license license:expat)))
+
+(define-public python-sybil
+ (package
+ (name "python-sybil")
+ (version "1.0.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sybil" version))
+ (sha256
+ (base32
+ "13rdznw3fllmj5sy20bwi3ipzm6rv1dnji1yi01m91ig759jacw6"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(;("python-coveralls" ,python-coveralls)
+ ("python-nose" ,python-nose)
+ ("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/cjw296/sybil")
+ (synopsis
+ "Automated testing for the examples in your documentation.")
+ (description
+ "Automated testing for the examples in your documentation.")
+ (license license:expat)))
+
+(define-public python-sarge
+ (package
+ (name "python-sarge")
+ (version "0.1.5.post0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sarge" version))
+ (sha256
+ (base32
+ "1c1ll7pys9vra5cfi8jxlgrgaql6c27l6inpy15aprgqhc4ck36s"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (home-page "http://sarge.readthedocs.org/")
+ (synopsis
+ "A wrapper for subprocess which provides command pipeline functionality.")
+ (description
+ "A wrapper for subprocess which provides command pipeline functionality.")
+ (license license:bsd-3)))
+
+(define-public python-unidiff
+ (package
+ (name "python-unidiff")
+ (version "0.5.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "unidiff" version))
+ (sha256
+ (base32
+ "1g1501w0ac9plqxd6009ax5c0hi495sv5xnysm68p65njvxvb6lw"))))
+ (build-system python-build-system)
+ (home-page
+ "http://github.com/matiasb/python-unidiff")
+ (synopsis
+ "Unified diff parsing/metadata extraction library.")
+ (description
+ "Unified diff parsing/metadata extraction library.")
+ (license license:expat)))
+
+(define-public python-testfixtures
+ (package
+ (name "python-testfixtures")
+ (version "5.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "testfixtures" version))
+ (sha256
+ (base32
+ "1w581221qbsmc177n7xijqn7wghyaaxxlwd2p34vfcn4jnbfv2ik"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-coverage" ,python-coverage)
+ ;("python-coveralls" ,python-coveralls)
+ ("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
+ ;("python-pytest-django" ,python-pytest-django)
+ ("python-sybil" ,python-sybil)
+ ("python-zope-component" ,python-zope-component)))
+ (home-page
+ "https://github.com/Simplistix/testfixtures")
+ (synopsis
+ "A collection of helpers and mock objects for unit tests and doc tests.")
+ (description
+ "A collection of helpers and mock objects for unit tests and doc tests.")
+ (license license:expat)))
+
+(define-public python-pyprint
+ (package
+ (name "python-pyprint")
+ (version "0.2.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyPrint" version))
+ (sha256
+ (base32
+ "1qmhcz8n9rnxkj2ikcc208900yg4p9qglhw50br7carr1ca1q3ps"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-colorama" ,python-colorama)
+ ("python-termcolor" ,python-termcolor)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "")
+ (synopsis
+ "A library providing printing facilities for python applications.")
+ (description
+ "A library providing printing facilities for python applications.")
+ (license #f)))
+
+(define-public python-libclang-py3
+ (package
+ (name "python-libclang-py3")
+ (version "3.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "libclang-py3" version))
+ (sha256
+ (base32
+ "0g2zw3mv8i4s9r3l70a5j3k2c09p9igvap0h6lfwf0w32jz8a65b"))))
+ (build-system python-build-system)
+ (home-page
+ "https://bitbucket.org/Anteru/python3-libclang")
+ (synopsis "Python3 bindings for libclang")
+ (description "Python3 bindings for libclang")
+ (license #f)))
+
+(define-public python-coala-utils
+ (package
+ (name "python-coala-utils")
+ (version "0.6.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "coala_utils" version))
+ (sha256
+ (base32
+ "0f2bli6acqjz3i5p6a5ykg9r2hkcaxcpq5q36a2jv30wdjkk31z1"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-appdirs" ,python-appdirs)
+ ("python-pyprint" ,python-pyprint)
+ ("python-testfixtures" ,python-testfixtures)))
+ (home-page
+ "https://gitlab.com/coala/coala-utils")
+ (synopsis "A collection of coala utilities.")
+ (description "A collection of coala utilities.")
+ (license #f)))
+
+(define-public python-dependency-management
+ (package
+ (name "python-dependency-management")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dependency_management" version))
+ (sha256
+ (base32
+ "0q5axi5vzla6vfgs8r5mxczih3w0vipa17mqkx2zcirxvy131i7h"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-coala-utils" ,python-coala-utils)
+ ("python-sarge" ,python-sarge)))
+ (home-page "https://gitlab.com/coala/package_manager")
+ (synopsis "coala Dependency Management")
+ (description "coala Dependency Management")
+ (license #f)))
+
+(define-public python-colorlog
+ (package
+ (name "python-colorlog")
+ (version "3.1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "colorlog" version))
+ (sha256
+ (base32
+ "0i21sd6pggr2gqza41vyq2rqyb552wf5iwl4bc16i7kqislbd53z"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-colorama" ,python-colorama)))
+ (home-page
+ "https://github.com/borntyping/python-colorlog")
+ (synopsis "Log formatting with colors!")
+ (description "Log formatting with colors!")
+ (license #f)))
+
+(define-public coala
+ (package
+ (name "coala")
+ (version "0.11.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "coala" version))
+ (sha256
+ (base32
+ "03mz2alvjf9aki5cpjl9167bd5kw0aqp8yml08lb5170gpsfyjyd"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-requires
+ (lambda _
+ (for-each (lambda (requirement)
+ (substitute* "requirements.txt"
+ (((string-append requirement "~="))
+ (string-append requirement ">="))))
+ '("testfixtures"
+ "libclang-py3"
+ "colorlog"))
+ #t)))))
+ (propagated-inputs
+ `(("python-appdirs" ,python-appdirs)
+ ("python-coala-utils" ,python-coala-utils)
+ ("python-colorlog" ,python-colorlog)
+ ("python-dependency-management"
+ ,python-dependency-management)
+ ("python-libclang-py3" ,python-libclang-py3)
+ ("python-packaging" ,python-packaging)
+ ("python-pygments" ,python-pygments)
+ ("python-pyprint" ,python-pyprint)
+ ("python-requests" ,python-requests)
+ ("python-setuptools" ,python-setuptools)
+ ("python-testfixtures" ,python-testfixtures)
+ ("python-unidiff" ,python-unidiff)))
+ (home-page "http://coala.io/")
+ (synopsis
+ "Linting and Fixing Code for All Languages")
+ (description
+ "Linting and Fixing Code for All Languages")
+ (license #f)))
+
+(define-public python-autoflake
+ (package
+ (name "python-autoflake")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "autoflake" version))
+ (sha256
+ (base32
+ "0cfidqg3msagg92l1hbc644nih0n615c5p9ab1s4yr82g956hkd7"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pyflakes" ,python-pyflakes)))
+ (home-page "https://github.com/myint/autoflake")
+ (synopsis
+ "Removes unused imports and unused variables")
+ (description
+ "Removes unused imports and unused variables")
+ (license #f)))
+
+(define-public python-cmakelint
+ (package
+ (name "python-cmakelint")
+ (version "1.3.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cmakelint" version))
+ (sha256
+ (base32
+ "1fb7jlkp6bxx2i80g0z4xl11i927lh74v9bbnkgv9raafqphj9pg"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/richq/cmake-lint")
+ (synopsis "Static code checker for CMake files")
+ (description
+ "Static code checker for CMake files")
+ (license license:asl2.0)))
+
+(define-public python-cppclean
+ (package
+ (name "python-cppclean")
+ (version "0.12")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cppclean" version))
+ (sha256
+ (base32
+ "05p0qsmrn3zhp33rhdys0ddn8hql6z25sdvbnccqwps8jai5wq2r"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/myint/cppclean")
+ (synopsis
+ "Find problems in C++ source that slow development of large code bases.")
+ (description
+ "Find problems in C++ source that slow development of large code bases.")
+ (license #f)))
+
+(define-public python-cpplint
+ (package
+ (name "python-cpplint")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cpplint" version))
+ (sha256
+ (base32
+ "06b7jf9vii2rp8q05h5h6jsrflrwpv2bd5chrj2drij476f16xk8"))))
+ (build-system python-build-system)
+ (home-page
+ "http://en.wikipedia.org/wiki/Cpplint")
+ (synopsis
+ "An automated checker to make sure a C++ file follows Google's C++ style guide")
+ (description
+ "An automated checker to make sure a C++ file follows Google's C++ style guide")
+ (license #f)))
+
+(define-public python-dennis
+ (package
+ (name "python-dennis")
+ (version "0.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dennis" version))
+ (sha256
+ (base32
+ "0116hbz6dakwcafcij5hr553gwf7wmg9q1mwmrfwc0vxvbajv54c"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)
+ ("python-polib" ,python-polib)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "http://github.com/willkg/dennis")
+ (synopsis
+ "Utilities for working with PO and POT files to ease development and improve localization quality")
+ (description
+ "Utilities for working with PO and POT files to ease development and improve localization quality")
+ (license #f)))
+
+(define-public python-eradicate
+ (package
+ (name "python-eradicate")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "eradicate" version))
+ (sha256
+ (base32
+ "092zmck919bn6sl31ixrzhn88g9nvhwzmwzpq8dzgn6c8k2h3bzr"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/myint/eradicate")
+ (synopsis "Removes commented-out code.")
+ (description "Removes commented-out code.")
+ (license #f)))
+
+(define-public python-guess-language-spirit
+ (package
+ (name "python-guess-language-spirit")
+ (version "0.5.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "guess_language-spirit" version ".tar.bz2"))
+ (sha256
+ (base32
+ "1k4j0xldg741a09lin7iy6sqrah5kr2zcpq5kfvd3gvb4iq09cm9"))))
+ (build-system python-build-system)
+ (home-page
+ "https://bitbucket.org/spirit/guess_language")
+ (synopsis "Guess the natural language of a text")
+ (description
+ "Guess the natural language of a text")
+ (license #f)))
+
+(define-public python-template-remover
+ (package
+ (name "python-template-remover")
+ (version "0.1.9")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "template-remover" version))
+ (sha256
+ (base32
+ "0hgzynfi9z1qjk7qz4nd1620w9m1rjpmd4xjxp0zmbsn7zk1q3s8"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-docopt" ,python-docopt)))
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (home-page
+ "http://github.com/deezer/template-remover")
+ (synopsis
+ "Remove the template markup from html files")
+ (description
+ "Remove the template markup from html files")
+ (license #f)))
+
+(define-public python-html-linter
+ (package
+ (name "python-html-linter")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "html-linter" version))
+ (sha256
+ (base32
+ "148ijk0hisb9b049xgc72gxdil3f0ichkpigasi11j1ggxkssb9l"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-docopt" ,python-docopt)
+ ("python-template-remover" ,python-template-remover)))
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (home-page "http://github.com/sk-/html-linter")
+ (synopsis
+ "Lints an HTML5 file using Google's style guide")
+ (description
+ "Lints an HTML5 file using Google's style guide")
+ (license #f)))
+
+(define-public python-mypy-lang
+ (package
+ (name "python-mypy-lang")
+ (version "0.5.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "mypy-lang" version))
+ (sha256
+ (base32
+ "0ibwh1v6f7a0w4hpd3ydw9k7ph74b2lcfwwlli9pzby0vzwg2jq5"))))
+ (build-system python-build-system)
+ (home-page "")
+ (synopsis
+ "Dummy to remind people to switch to 'pip install mypy'")
+ (description
+ "Dummy to remind people to switch to 'pip install mypy'")
+ (license #f)))
+
+(define-public python-proselint
+ (package
+ (name "python-proselint")
+ (version "0.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "proselint" version))
+ (sha256
+ (base32
+ "1g8vx04gmv0agmggz1ml5vydfppqvl8dzjvqm6vqw5rzafa89m08"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-six" ,python-six)
+ ("python-future" ,python-future)
+ ("python-click" ,python-click)))
+ (home-page
+ "http://github.com/amperser/proselint")
+ (synopsis "A linter for prose")
+ (description "A linter for prose")
+ (license license:bsd-3)))
+
+(define-public python-pydocstyle
+ (package
+ (name "python-pydocstyle")
+ (version "2.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pydocstyle" version))
+ (sha256
+ (base32
+ "15ssv8l6cvrmzgwcdzw76rnl4np3qf0dbwr1wsx76y0hc7lwsnsd"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-configparser" ,python-configparser)
+ ("python-six" ,python-six)
+ ("python-snowballstemmer"
+ ,python-snowballstemmer)))
+ (home-page
+ "https://github.com/PyCQA/pydocstyle/")
+ (synopsis "Python docstring style checker")
+ (description "Python docstring style checker")
+ (license license:expat)))
+
+(define-public python-pyroma
+ (package
+ (name "python-pyroma")
+ (version "2.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyroma" version))
+ (sha256
+ (base32
+ "0ncnmrqs19jma2q5yz1sh0lcllvg8m96p78bxm50k6bzfc52h07x"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-docutils" ,python-docutils)))
+ (home-page "https://github.com/regebro/pyroma")
+ (synopsis
+ "Test your project's packaging friendliness")
+ (description
+ "Test your project's packaging friendliness")
+ (license license:expat)))
+
+(define-public python-restructuredtext-lint
+ (package
+ (name "python-restructuredtext-lint")
+ (version "1.1.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "restructuredtext_lint" version))
+ (sha256
+ (base32
+ "0ds05cc5qx1gagwy3cvr93pckvgsvi3zwhgh14l2cari9jlak364"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-docutils"
+ ,python-docutils)))
+ (home-page
+ "https://github.com/twolfson/restructuredtext-lint")
+ (synopsis "reStructuredText linter")
+ (description "reStructuredText linter")
+ (license #f)))
+
+(define-public python-rstcheck
+ (package
+ (name "python-rstcheck")
+ (version "3.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "rstcheck" version))
+ (sha256
+ (base32
+ "1pr1zcd77fj97q6kiz5rfs0nrz1mjwijr4jylcvfk9ca6cyqjnhm"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-docutils"
+ ,python-docutils)))
+ (home-page "https://github.com/myint/rstcheck")
+ (synopsis
+ "Checks syntax of reStructuredText and code blocks nested within it")
+ (description
+ "Checks syntax of reStructuredText and code blocks nested within it")
+ (license #f)))
+
+(define-public python-dparse
+ (package
+ (name "python-dparse")
+ (version "0.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "dparse" version))
+ (sha256
+ (base32
+ "10pm9q5r97828rml3pzi428ihf2cpaiw25hssgbax0zxv1sr37vw"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-packaging" ,python-packaging)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (home-page "https://github.com/jayfk/dparse")
+ (synopsis "A parser for Python dependency files")
+ (description
+ "A parser for Python dependency files")
+ (license license:expat)))
+
+(define-public python-safety
+ (package
+ (name "python-safety")
+ (version "1.7.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "safety" version))
+ (sha256
+ (base32
+ "0yipd9bpxs600dckkr91i51hscs5x9qidi1nbs1367brmmv4n37z"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-click" ,python-click)
+ ("python-dparse" ,python-dparse)
+ ("python-packaging" ,python-packaging)
+ ("python-requests" ,python-requests)))
+ (home-page "https://github.com/pyupio/safety")
+ (synopsis
+ "Safety checks your installed dependencies for known security vulnerabilities.")
+ (description
+ "Safety checks your installed dependencies for known security vulnerabilities.")
+ (license license:expat)))
+
+(define-public python-scspell3k
+ (package
+ (name "python-scspell3k")
+ (version "2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "scspell3k" version))
+ (sha256
+ (base32
+ "02dp70ikvb2yw839cycjksyi1izvfjlwjps74fh3279asa59m2d9"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/myint/scspell")
+ (synopsis
+ "A conservative interactive spell checker for source code.")
+ (description
+ "A conservative interactive spell checker for source code.")
+ (license #f)))
+
+(define-public python-ansicolor
+ (package
+ (name "python-ansicolor")
+ (version "0.2.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ansicolor" version))
+ (sha256
+ (base32
+ "078zsfx1wchz9l9brp5nz623adydwqxabg4zd4qyszfxp43inzni"))))
+ (build-system python-build-system)
+ (home-page
+ "https://github.com/numerodix/ansicolor")
+ (synopsis
+ "A library to produce ansi color output and colored highlighting and diffing")
+ (description
+ "A library to produce ansi color output and colored highlighting and diffing")
+ (license #f)))
+
+(define-public python-vim-vint
+ (package
+ (name "python-vim-vint")
+ (version "0.3.18")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "vim-vint" version))
+ (sha256
+ (base32
+ "0w038bgic7rdim60rhwrx3gwj33lgmhad8shpvcl2iy6fy8rpp7y"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (propagated-inputs
+ `(("python-ansicolor" ,python-ansicolor)
+ ("python-chardet" ,python-chardet)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page "https://github.com/Kuniwak/vint")
+ (synopsis "Lint tool for Vim script Language")
+ (description "Lint tool for Vim script Language")
+ (license #f)))
+
+(define-public python-vulture
+ (package
+ (name "python-vulture")
+ (version "0.26")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "vulture" version))
+ (sha256
+ (base32
+ "1884vymmlwnpw2naam5xn3cn7w74sn24yvpkf9n567sb3kkzmc49"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f))
+ (home-page
+ "https://github.com/jendrikseipp/vulture")
+ (synopsis "Find dead code")
+ (description "Find dead code")
+ (license license:expat)))
+
+(define-public python-pathspec
+ (package
+ (name "python-pathspec")
+ (version "0.5.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pathspec" version))
+ (sha256
+ (base32
+ "1lyhyc6ps4imcj4f99c3njqf3wk2c0f6szrhkqhp8rp7pg8rbi3j"))))
+ (build-system python-build-system)
+ (home-page
+ "https://github.com/cpburnz/python-path-specification")
+ (synopsis
+ "Utility library for gitignore style pattern matching of file paths.")
+ (description
+ "Utility library for gitignore style pattern matching of file paths.")
+ (license #f)))
+
+(define-public python-yamllint
+ (package
+ (name "python-yamllint")
+ (version "1.11.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "yamllint" version))
+ (sha256
+ (base32
+ "114nbzy8s9sr9czxx7g64p8naf46zgk2cab0df00l3sz6bmcmkq5"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pathspec" ,python-pathspec)
+ ("python-pyyaml" ,python-pyyaml)))
+ (home-page
+ "https://github.com/adrienverge/yamllint")
+ (synopsis "A linter for YAML files.")
+ (description "A linter for YAML files.")
+ (license #f)))
+
+(define-public python-munkres3
+ (package
+ (name "python-munkres3")
+ (version "1.0.5.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "munkres3" version))
+ (sha256
+ (base32
+ "1kyc4nqrff1zri6ky96s4msls7263jy8rp7hid2q1dcnjb9i1hgp"))))
+ (build-system python-build-system)
+ (home-page
+ "http://github.com/datapublica/munkres")
+ (synopsis
+ "munkres algorithm for the Assignment Problem. Python 3 port.")
+ (description
+ "munkres algorithm for the Assignment Problem. Python 3 port.")
+ (license #f)))
+
+(define-public coala-bears
+ (package
+ (name "coala-bears")
+ (version "0.11.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "coala-bears" version))
+ (sha256
+ (base32
+ "08jlf9jxch1i27kgfmqhnn8qdxzbi2v2l8fwpnc621s6br5k13wl"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-requires
+ (lambda _
+ (for-each (lambda (requirement)
+ (substitute* "bear-requirements.txt"
+ (((string-append requirement "(=|~)="))
+ (string-append requirement ">="))))
+ '("autoflake"
+ "click"
+ "eradicate"
+ "html-linter"
+ "mypy-lang"
+ "proselint"
+ "pydocstyle"
+ "pyflakes"
+ "pyroma"
+ "radon"
+ "restructuredtext-lint"
+ "rstcheck"
+ "safety"
+ "vulture"
+ "yamllint"
+ "yapf"))
+ #t)))))
+ (propagated-inputs
+ `(;;("python-aenum" ,python-aenum)
+ ;; ("python-apertium-lint" ,python-apertium-lint)
+ ("python-autoflake" ,python-autoflake)
+ ("python-autopep8" ,python-autopep8)
+ ("python-bandit" ,python-bandit)
+ ("python-click" ,python-click)
+ ("python-cmakelint" ,python-cmakelint)
+ ("coala" ,coala)
+ ("python-cppclean" ,python-cppclean)
+ ("python-cpplint" ,python-cpplint)
+ ("python-dennis" ,python-dennis)
+ ;; ("python-docutils-ast-writer"
+ ;; ,python-docutils-ast-writer)
+ ("python-eradicate" ,python-eradicate)
+ ("python-guess-language-spirit"
+ ,python-guess-language-spirit)
+ ("python-html-linter" ,python-html-linter)
+ ;; ("python-httpolice" ,python-httpolice)
+ ("python-isort" ,python-isort)
+ ;; ("python-memento-client" ,python-memento-client)
+ ("python-munkres3" ,python-munkres3)
+ ("python-mypy-lang" ,python-mypy-lang)
+ ("python-nbformat" ,python-nbformat)
+ ("python-nltk" ,python-nltk)
+ ("python-proselint" ,python-proselint)
+ ("python-pycodestyle" ,python-pycodestyle)
+ ("python-pydocstyle" ,python-pydocstyle)
+ ("python-pyflakes" ,python-pyflakes)
+ ("python-pylint" ,python-pylint)
+ ("python-pyroma" ,python-pyroma)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-radon" ,python-radon)
+ ("python-restructuredtext-lint"
+ ,python-restructuredtext-lint)
+ ("python-rstcheck" ,python-rstcheck)
+ ("python-safety" ,python-safety)
+ ("python-scspell3k" ,python-scspell3k)
+ ("python-vim-vint" ,python-vim-vint)
+ ("python-vulture" ,python-vulture)
+ ("python-yamllint" ,python-yamllint)
+ ("python-yapf" ,python-yapf)
+ ))
+ (home-page "http://coala.rtfd.org/")
+ (synopsis
+ "Bears for coala (Code Analysis Application)")
+ (description
+ "Bears for coala (Code Analysis Application)")
+ (license #f)))
diff --git a/gnu/packages/rabbitmq.scm b/gnu/packages/rabbitmq.scm
new file mode 100644
index 0000000000..70d3b5eebd
--- /dev/null
+++ b/gnu/packages/rabbitmq.scm
@@ -0,0 +1,93 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages rabbitmq)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix utils)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix download)
+ #:use-module (guix packages)
+ #:use-module (gnu packages base)
+ #:use-module (gnu packages compression)
+ #:use-module (gnu packages xml)
+ #:use-module (gnu packages rsync)
+ #:use-module (gnu packages erlang)
+ #:use-module (gnu packages elixir)
+ #:use-module (gnu packages python))
+
+(define-public rabbitmq
+ (package
+ (name "rabbitmq")
+ (version "3.7.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/rabbitmq/rabbitmq-server/releases/download/v"
+ version
+ "/rabbitmq-server-" version ".tar.xz"))
+ (file-name (string-append name "-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0cal4ss981i5af7knjkz3jqmz25nd4pfppay163q6xk2llxrcj9m"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "deps/rabbit_common/src/vm_memory_monitor.erl"
+ (("getconf") (string-append (assoc-ref inputs "glibc")
+ "/bin/getconf")))
+ (substitute* "deps/rabbit/src/rabbit_disk_monitor.erl"
+ (("os:find_executable\\(\"df\"\\)")
+ (string-append "\"" (which "df") "\"")))
+ #t))
+ (delete 'configure)
+ (delete 'check)
+ (add-after 'install 'patch-scripts
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/sbin/rabbitmq-server")
+ (("uname") (which "uname"))
+ (("mkdir") (which "mkdir"))
+ (("cp ") (string-append (which "cp") " "))
+ (("\\$\\{ERL\\_DIR\\}") (string-append (dirname (which "erl"))
+ "/"))
+ (("dirname") (which "dirname")))
+ (substitute* (string-append out "/sbin/rabbitmq-env")
+ (("dirname") (which "dirname"))
+ (("\\$\\{ERL\\_DIR\\}") (string-append (dirname (which "erl"))
+ "/"))
+ (("\\| tr") (string-append "| " (which "tr")))
+ (("basename") (which "basename"))
+ (("sed") (which "sed")))
+ #t))))
+ #:make-flags
+ (list (string-append "RMQ_ERLAPP_DIR=" (assoc-ref %outputs "out")))))
+ (native-inputs
+ `(("erlang" ,erlang)
+ ("elixir" ,elixir)
+ ("python" ,python-wrapper)
+ ("libxslt" ,libxslt)
+ ("rsync" ,rsync)
+ ("glibc",glibc)
+ ("zip" ,zip)))
+ (home-page "http://www.rabbitmq.com/")
+ (synopsis "TODO")
+ (description "TODO")
+ (license "TODO")))
+
diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index f14b152fdb..d96c5b0dfc 100644
--- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -22,7 +22,48 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
- #:use-module (guix build-system go))
+ #:use-module (guix build-system go)
+ #:use-module (gnu packages golang)
+ #:use-module (gnu packages cdrom)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages virtualization))
+
+(define-public terraform
+ (package
+ (name "terraform")
+ (version "0.11.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hashicorp/terraform")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0637x7jcm62pdnivmh4rggly6dmlvdh3jpsd1z4vba15gbm203nz"))))
+ (build-system go-build-system)
+ (outputs '("out" "lib"))
+ (arguments
+ '(#:import-path "github.com/hashicorp/terraform"
+ #:phases
+ (modify-phases %standard-phases
+ ;; I'm not sure what purpose they serve, but they are readonly, so
+ ;; they break the reset-gzip-timestamps phase.
+ (add-after 'install 'delete-test-fixtures
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append
+ (assoc-ref outputs "lib")
+ "/src/github.com/hashicorp/terraform/config/module/test-fixtures")))))))
+ (synopsis "Tool for building and changing computing infrastructure")
+ (description
+ "Terraform uses descriptions of infrastructure written in @acronym{HCL,
+Hashicorp Configuration Language} which describe graphs of resources,
+including information about dependencies. From this, Terraform can plan and
+apply changes to the described resources.
+
+Terraform uses plugins that provide intergrations to different providers.")
+ (home-page "https://www.terraform.io/")
+ (license license:mpl2.0)))
(define-public terraform-docs
(package
@@ -47,3 +88,120 @@ the inputs and outputs for modules of the Terraform infrastructure management
tool. These can be shown, or written to a file in JSON or Markdown formats.")
(home-page "https://github.com/segmentio/terraform-docs")
(license license:expat)))
+
+(define-public terraform-provider-libvirt
+ (package
+ (name "terraform-provider-libvirt")
+ (version "0.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/dmacvicar/terraform-provider-libvirt")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "004gxy55p5cf39f2zpah0i2zhvs4x6ixnxy8z9v7314604ggpkna"))))
+ (build-system go-build-system)
+ (outputs '("out" "lib"))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (inputs
+ `(("libvirt" ,libvirt)
+ ("cdrtools" ,cdrtools)))
+ (arguments
+ '(#:import-path "github.com/dmacvicar/terraform-provider-libvirt"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-mkisofs
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute*
+ "src/github.com/dmacvicar/terraform-provider-libvirt/libvirt/cloudinit_def.go"
+ (("mkisofs")
+ (string-append (assoc-ref inputs "cdrtools")
+ "/bin/mkisofs")))))
+ ;; This should be redundant once the vendor directory is removed from
+ ;; this package
+ (add-before 'reset-gzip-timestamps 'remove-readonly-gzip-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each delete-file
+ (find-files
+ (assoc-ref outputs "lib")
+ ".*\\.t?gz")))))))
+ (synopsis "")
+ (description "")
+ (home-page "")
+ (license "")))
+
+(define-public terraform-provider-template
+ (package
+ (name "terraform-provider-template")
+ (version "1.0.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/terraform-providers/terraform-provider-template")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jl6bp6gwg96sdk5j6s13vv1j9gxjpy2yva3barmzv9138i665mz"))))
+ (build-system go-build-system)
+ (outputs '("out" "lib"))
+ (arguments
+ '(#:import-path "github.com/terraform-providers/terraform-provider-template"))
+ (synopsis "")
+ (description "")
+ (home-page "")
+ (license "")))
+
+(define-public terraform-provider-aws
+ (package
+ (name "terraform-provider-aws")
+ (version "1.23.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/terraform-providers/terraform-provider-aws")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "156277pbllmglpppnrp6qskiq744mxjjmsw39d0d3qpqs5af4x1y"))))
+ (build-system go-build-system)
+ (outputs '("out" "lib"))
+ (arguments
+ '(#:import-path "github.com/terraform-providers/terraform-provider-aws"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'reset-gzip-timestamps 'remove-readonly-gzip-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each delete-file
+ (find-files
+ (assoc-ref outputs "lib")
+ ".*\\.t?gz")))))))
+ (synopsis "")
+ (description "")
+ (home-page "")
+ (license "")))
+
+(define-public terraform-provider-local
+ (package
+ (name "terraform-provider-local")
+ (version "1.1.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/terraform-providers/terraform-provider-local")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qxfyyg8k43rw0gny4dadamc2a9hk3x6ybdivifjc17m7il0janc"))))
+ (build-system go-build-system)
+ (outputs '("out" "lib"))
+ (arguments
+ '(#:import-path "github.com/terraform-providers/terraform-provider-local"))
+ (synopsis "")
+ (description "")
+ (home-page "")
+ (license "")))
diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index aff78a0566..ab63019f77 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -51,6 +51,18 @@
postgresql-service
postgresql-service-type
+ <elasticsearch-configuration>
+ elasticsearch-configuration
+ elasticsearch-configuration?
+ elasticsearch-configuration-elasticsearch
+ elasticsearch-configuration-data-path
+ elasticsearch-configuration-logs-path
+ elasticsearch-configuration-port
+ elasticsearch-configuration-transport-port
+
+ elasticsearch-service
+ elasticsearch-service-type
+
memcached-service-type
<memcached-configuration>
memcached-configuration
@@ -268,6 +280,101 @@ and stores the database cluster in @var{data-directory}."
;;;
+;;; Elasticsearch
+;;;
+
+(define-record-type* <elasticsearch-configuration>
+ elasticsearch-configuration make-elasticsearch-configuration
+ elasticsearch-configuration?
+ (elasticsearch elasticsearch-configuration-elasticsearch
+ (default elasticsearch))
+ (data-path elasticsearch-configuration-data-path
+ (default "/var/lib/"))
+ (logs-path elasticsearch-configuration-logs-path
+ (default "/var/log/elasticsearch"))
+ (http-port elasticsearch-configuration-port
+ (default 9200))
+ (transport-port elasticsearch-configuration-transport-port
+ (default 9300)))
+
+(define (elasticsearch-configuration-directory
+ data-path logs-path http-port transport-port)
+ (computed-file
+ "elasticsearch-config"
+ #~(begin
+ (mkdir #$output)
+ (mkdir (string-append #$output "/scripts"))
+ (call-with-output-file (string-append #$output "/elasticsearch.yml")
+ (lambda (port)
+ (display
+ (string-append
+ "path.data: " #$data-path "\n"
+ "path.logs: " #$logs-path "\n"
+ "http.port: " #$(number->string http-port) "\n"
+ "transport.tcp.port: " #$(number->string transport-port) "\n")
+ port))))))
+
+(define %elasticsearch-accounts
+ (list (user-group (name "elasticsearch") (system? #t))
+ (user-account
+ (name "elasticsearch")
+ (group "elasticsearch")
+ (system? #t)
+ (comment "Elasticsearch server user")
+ (home-directory "/var/empty")
+ (shell (file-append shadow "/sbin/nologin")))))
+
+(define elasticsearch-activation
+ (match-lambda
+ (($ <elasticsearch-configuration> elasticsearch data-path logs-path
+ http-port transport-port)
+ #~(begin
+ (use-modules (guix build utils)
+ (ice-9 match))
+
+ (let ((user (getpwnam "elasticsearch")))
+ ;; Create db state directory.
+ (for-each
+ (lambda (path)
+ (mkdir-p path)
+ (chown path (passwd:uid user) (passwd:gid user)))
+ '(#$data-path #$logs-path "/var/run/elasticsearch")))))))
+
+(define elasticsearch-shepherd-service
+ (match-lambda
+ (($ <elasticsearch-configuration> elasticsearch data-path logs-path
+ http-port transport-port)
+ (list (shepherd-service
+ (provision '(elasticsearch))
+ (documentation "Run the Elasticsearch daemon.")
+ (requirement '(user-processes syslogd))
+ (start #~(make-forkexec-constructor
+ (list
+ (string-append #$elasticsearch "/bin/elasticsearch")
+ "-d"
+ "-p" "/var/run/elasticsearch/pid"
+ (string-append
+ "-Dpath.conf="
+ #$(elasticsearch-configuration-directory
+ data-path logs-path http-port transport-port)))
+ #:user "elasticsearch"
+ #:pid-file "/var/run/elasticsearch/pid"
+ #:log-file "/var/log/elasticsearch.log"))
+ (stop #~(make-kill-destructor)))))))
+
+(define elasticsearch-service-type
+ (service-type (name 'elasticsearch)
+ (extensions
+ (list (service-extension shepherd-root-service-type
+ elasticsearch-shepherd-service)
+ (service-extension activation-service-type
+ elasticsearch-activation)
+ (service-extension account-service-type
+ (const %elasticsearch-accounts))))
+ (default-value (elasticsearch-configuration))))
+
+
+;;;
;;; Memcached
;;;
@@ -449,8 +556,9 @@ storage:
(($ <mysql-configuration> mysql port)
(mixed-text-file "my.cnf" "[mysqld]
datadir=/var/lib/mysql
-socket=/run/mysqld/mysqld.sock
+socket=/var/run/mysql/mysqld.sock
port=" (number->string port) "
+max_allowed_packet=16M
"))))
(define (%mysql-activation config)
@@ -465,7 +573,7 @@ port=" (number->string port) "
(uid (passwd:uid user))
(gid (passwd:gid user))
(datadir "/var/lib/mysql")
- (rundir "/run/mysqld"))
+ (rundir "/var/run/mysql"))
(mkdir-p datadir)
(chown datadir uid gid)
(mkdir-p rundir)
@@ -516,8 +624,11 @@ FLUSH PRIVILEGES;
(my.cnf (mysql-configuration-file config)))
#~(make-forkexec-constructor
(list (string-append #$mysql "/bin/mysqld")
- (string-append "--defaults-file=" #$my.cnf))
- #:user "mysql" #:group "mysql")))
+ (string-append "--defaults-file=" #$my.cnf)
+ "--pid-file=/var/run/mysql/pid")
+ #:user "mysql"
+ #:group "mysql"
+ #:pid-file "/var/run/mysql/pid")))
(stop #~(make-kill-destructor)))))
(define mysql-service-type
diff --git a/gnu/services/message-broker.scm b/gnu/services/message-broker.scm
new file mode 100644
index 0000000000..e711a4cbdc
--- /dev/null
+++ b/gnu/services/message-broker.scm
@@ -0,0 +1,114 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu services message-broker)
+ #:use-module (gnu services)
+ #:use-module (gnu services shepherd)
+ #:use-module (gnu system shadow)
+ #:use-module (gnu packages admin)
+ #:use-module ((gnu packages base) #:select (glibc-utf8-locales))
+ #:use-module (gnu packages rabbitmq)
+ #:use-module (guix modules)
+ #:use-module (guix records)
+ #:use-module (guix gexp)
+ #:use-module (ice-9 match)
+ #:export (<rabbitmq-configuration>
+ rabbitmq-configuration
+ rabbitmq-configuration?
+ rabbitmq-configuration-rabbitmq
+ rabbitmq-configuration-locale
+ rabbitmq-configuration-interfaces
+ rabbitmq-configuration-tcp-port
+ rabbitmq-configuration-udp-port
+ rabbitmq-configuration-additional-options
+
+ rabbitmq-service-type))
+
+
+;;;
+;;; RabbitMQ
+;;;
+
+(define-record-type* <rabbitmq-configuration>
+ rabbitmq-configuration make-rabbitmq-configuration
+ rabbitmq-configuration?
+ (rabbitmq rabbitmq-configuration-rabbitmq ;<package>
+ (default rabbitmq))
+ (locale rabbitmq-configuration-rabbitmq
+ (default "en_US.UTF-8"))
+ (interfaces rabbitmq-configuration-interfaces
+ (default '("0.0.0.0")))
+ (tcp-port rabbitmq-configuration-tcp-port
+ (default 11211))
+ (udp-port rabbitmq-configuration-udp-port
+ (default 11211))
+ (additional-options rabbitmq-configuration-additional-options
+ (default '())))
+
+(define %rabbitmq-accounts
+ (list (user-group (name "rabbitmq") (system? #t))
+ (user-account
+ (name "rabbitmq")
+ (group "rabbitmq")
+ (system? #t)
+ (comment "Rabbitmq server user")
+ (home-directory "/var/lib/rabbitmq")
+ (shell (file-append shadow "/sbin/nologin")))))
+
+(define rabbitmq-activation
+ #~(begin
+ (use-modules (guix build utils))
+ (let ((user (getpwnam "rabbitmq")))
+ (mkdir-p "/var/run/rabbitmq")
+ (chown "/var/run/rabbitmq"
+ (passwd:uid user) (passwd:gid user)))))
+
+(define rabbitmq-shepherd-service
+ (match-lambda
+ (($ <rabbitmq-configuration> rabbitmq locale interfaces tcp-port udp-port
+ additional-options)
+ (with-imported-modules (source-module-closure
+ '((gnu build shepherd)))
+ (list (shepherd-service
+ (provision '(rabbitmq))
+ (documentation "Run the Rabbitmq daemon.")
+ (requirement '(user-processes loopback))
+ (modules '((gnu build shepherd)))
+ (start #~(make-forkexec-constructor
+ '(#$(file-append rabbitmq "/sbin/rabbitmq-server"))
+ #:pid-file "/var/run/rabbitmq/pid"
+ #:environment-variables
+ `("RABBITMQ_PID_FILE=/var/run/rabbitmq/pid"
+ "HOME=/var/lib/rabbitmq"
+ ;; Elixir, the language used by RabbitMQ requires a
+ ;; UTF8 locale to function properly
+ ,(string-append "GUIX_LOCPATH="
+ #$glibc-utf8-locales "/lib/locale")
+ ,#$(string-append "LC_ALL=" locale))))
+ (stop #~(make-kill-destructor))))))))
+
+(define rabbitmq-service-type
+ (service-type (name 'rabbitmq)
+ (extensions
+ (list (service-extension shepherd-root-service-type
+ rabbitmq-shepherd-service)
+ (service-extension activation-service-type
+ (const rabbitmq-activation))
+ (service-extension account-service-type
+ (const %rabbitmq-accounts))))
+ (default-value (rabbitmq-configuration))))
diff --git a/gnu/system.scm b/gnu/system.scm
index ee48f48266..95dcc14dc5 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -450,7 +450,7 @@ value of the SYSTEM-SERVICE-TYPE service."
("initrd" ,initrd)
("locale" ,locale)))))))) ;used by libc
-(define* (essential-services os #:key container?)
+(define* (essential-services os #:key container? container-shared-network?)
"Return the list of essential services for OS. These are special services
that implement part of what's declared in OS are responsible for low-level
bookkeeping. CONTAINER? determines whether to return the list of services for
@@ -458,6 +458,9 @@ a container or that of a \"bare metal\" system."
(define known-fs
(map file-system-mount-point (operating-system-file-systems os)))
+ (if (and container-shared-network? (not container?))
+ (error "cannot specify container-shared-network? without container? #t"))
+
(let* ((mappings (device-mapping-services os))
(root-fs (root-file-system-service))
(other-fs (non-boot-file-system-service os))
@@ -481,7 +484,8 @@ a container or that of a \"bare metal\" system."
(account-service (append (operating-system-accounts os)
(operating-system-groups os))
(operating-system-skeletons os))
- (operating-system-etc-service os)
+ (operating-system-etc-service
+ os #:container-shared-network? container-shared-network?)
(service fstab-service-type '())
(session-environment-service
(operating-system-environment-variables os))
@@ -501,12 +505,13 @@ a container or that of a \"bare metal\" system."
(service firmware-service-type
(operating-system-firmware os))))))))
-(define* (operating-system-services os #:key container?)
+(define* (operating-system-services os #:key container? container-shared-network?)
"Return all the services of OS, including \"internal\" services that do not
explicitly appear in OS."
(instantiate-missing-services
(append (operating-system-user-services os)
- (essential-services os #:container? container?))))
+ (essential-services os #:container? container?
+ #:container-shared-network? container-shared-network?))))
;;;
@@ -575,7 +580,7 @@ This is the GNU system. Welcome.\n")
"Return the default /etc/hosts file."
(plain-file "hosts" (local-host-aliases host-name)))
-(define* (operating-system-etc-service os)
+(define* (operating-system-etc-service os #:key container-shared-network?)
"Return a <service> that builds containing the static part of the /etc
directory."
(let ((login.defs
@@ -677,16 +682,13 @@ then
source /run/current-system/profile/etc/profile.d/bash_completion.sh
fi\n")))
(etc-service
- `(("services" ,(file-append net-base "/etc/services"))
- ("protocols" ,(file-append net-base "/etc/protocols"))
+ `(("protocols" ,(file-append net-base "/etc/protocols"))
("rpc" ,(file-append net-base "/etc/rpc"))
("login.defs" ,#~#$login.defs)
("issue" ,#~#$issue)
("nsswitch.conf" ,#~#$nsswitch)
("profile" ,#~#$profile)
("bashrc" ,#~#$bashrc)
- ("hosts" ,#~#$(or (operating-system-hosts-file os)
- (default-/etc/hosts (operating-system-host-name os))))
;; Write the operating-system-host-name to /etc/hostname to prevent
;; NetworkManager from changing the system's hostname when connecting
;; to certain networks. Some discussion at
@@ -694,7 +696,13 @@ fi\n")))
("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
("localtime" ,(file-append tzdata "/share/zoneinfo/"
(operating-system-timezone os)))
- ("sudoers" ,(operating-system-sudoers-file os))))))
+ ("sudoers" ,(operating-system-sudoers-file os))
+ ,@(if container-shared-network?
+ '()
+ `(("services" ,(file-append net-base "/etc/services"))
+ ("hosts" ,#~#$(or (operating-system-hosts-file os)
+ (default-/etc/hosts
+ (operating-system-host-name os))))))))))
(define %root-account
;; Default root account.
@@ -803,20 +811,28 @@ use 'plain-file' instead~%")
root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL\n"))
-(define* (operating-system-activation-script os #:key container?)
+(define* (operating-system-activation-script os #:key container?
+ container-shared-network?)
"Return the activation script for OS---i.e., the code that \"activates\" the
stateful part of OS, including user accounts and groups, special directories,
etc."
- (let* ((services (operating-system-services os #:container? container?))
+ (let* ((services (operating-system-services
+ os
+ #:container? container?
+ #:container-shared-network? container-shared-network?))
(activation (fold-services services
#:target-type activation-service-type)))
(activation-service->script activation)))
-(define* (operating-system-boot-script os #:key container?)
+(define* (operating-system-boot-script os #:key container?
+ container-shared-network?)
"Return the boot script for OS---i.e., the code started by the initrd once
we're running in the final root. When CONTAINER? is true, skip all
hardware-related operations as necessary when booting a Linux container."
- (let* ((services (operating-system-services os #:container? container?))
+ (let* ((services (operating-system-services
+ os
+ #:container? container?
+ #:container-shared-network? container-shared-network?))
(boot (fold-services services #:target-type boot-service-type)))
(service-value boot)))
@@ -836,17 +852,24 @@ hardware-related operations as necessary when booting a Linux container."
#:target-type
shepherd-root-service-type))))
-(define* (operating-system-derivation os #:key container?)
+(define* (operating-system-derivation os #:key container?
+ container-shared-network?)
"Return a derivation that builds OS."
- (let* ((services (operating-system-services os #:container? container?))
+ (let* ((services (operating-system-services
+ os
+ #:container? container?
+ #:container-shared-network? container-shared-network?))
(system (fold-services services)))
;; SYSTEM contains the derivation as a monadic value.
(service-value system)))
-(define* (operating-system-profile os #:key container?)
+(define* (operating-system-profile os #:key container? container-shared-network?)
"Return a derivation that builds the system profile of OS."
(mlet* %store-monad
- ((services -> (operating-system-services os #:container? container?))
+ ((services -> (operating-system-services
+ os
+ #:container? container?
+ #:container-shared-network? container-shared-network?))
(profile (fold-services services
#:target-type profile-service-type)))
(match profile
diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm
index bceea41332..d28c39c624 100644
--- a/gnu/system/linux-container.scm
+++ b/gnu/system/linux-container.scm
@@ -60,18 +60,49 @@ containerized OS."
%container-file-systems
user-file-systems))))
-(define* (container-script os #:key (mappings '()))
+
+(define %network-configuration-files
+ '("/etc/resolv.conf"
+ "/etc/services"
+ "/etc/hosts"))
+
+(define* (container-script os #:key (mappings '())
+ container-shared-network?)
"Return a derivation of a script that runs OS as a Linux container.
MAPPINGS is a list of <file-system> objects that specify the files/directories
that will be shared with the host system."
- (let* ((os (containerized-operating-system os mappings))
+ (let* ((os (containerized-operating-system
+ os
+ (append
+ mappings
+ (if
+ container-shared-network?
+ (filter-map (lambda (file)
+ (and (file-exists? file)
+ (file-system-mapping
+ (source file)
+ (target file)
+ ;; XXX: On some GNU/Linux
+ ;; systems, /etc/resolv.conf is a
+ ;; symlink to a file in a tmpfs
+ ;; which, for an unknown reason,
+ ;; cannot be bind mounted
+ ;; read-only within the
+ ;; container.
+ (writable?
+ (string=?
+ file "/etc/resolv.conf")))))
+ %network-configuration-files)
+ '()))))
(file-systems (filter file-system-needed-for-boot?
(operating-system-file-systems os)))
(specs (map file-system->spec file-systems)))
- (mlet* %store-monad ((os-drv (operating-system-derivation
- os
- #:container? #t)))
+ (mlet* %store-monad ((os-drv
+ (operating-system-derivation
+ os
+ #:container? #t
+ #:container-shared-network? container-shared-network?)))
(define script
(with-imported-modules (source-module-closure
@@ -93,6 +124,9 @@ that will be shared with the host system."
;; users and groups, which is sufficient for most cases.
;;
;; See: http://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--private-users=
- #:host-uids 65536))))
+ #:host-uids 65536
+ #:namespaces (if #$container-shared-network?
+ (delq 'net %namespaces)
+ %namespaces)))))
(gexp->script "run-container" script))))
diff --git a/gnu/tests.scm b/gnu/tests.scm
index 9e8eed7d95..5d7f7442f5 100644
--- a/gnu/tests.scm
+++ b/gnu/tests.scm
@@ -54,6 +54,7 @@
system-test-description
system-test-location
+ test-modules
fold-system-tests
all-system-tests))
@@ -256,11 +257,12 @@ the system under test."
(set-record-type-printer! <system-test> write-system-test)
-(define (test-modules)
- "Return the list of modules that define system tests."
- (scheme-modules (dirname (search-path %load-path "guix.scm"))
- "gnu/tests"
- #:warn warn-about-load-error))
+(define test-modules
+ ;; Return the list of modules that define system tests.
+ (make-parameter
+ (scheme-modules (dirname (search-path %load-path "guix.scm"))
+ "gnu/tests"
+ #:warn warn-about-load-error)))
(define (fold-system-tests proc seed)
"Invoke PROC on each system test, passing it the test and the previous
diff --git a/gnu/tests/message-broker.scm b/gnu/tests/message-broker.scm
new file mode 100644
index 0000000000..f2f5590818
--- /dev/null
+++ b/gnu/tests/message-broker.scm
@@ -0,0 +1,86 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu tests message-broker)
+ #:use-module (gnu tests)
+ #:use-module (gnu system)
+ #:use-module (gnu system file-systems)
+ #:use-module (gnu system shadow)
+ #:use-module (gnu system vm)
+ #:use-module (gnu services)
+ #:use-module (gnu services message-broker)
+ #:use-module (gnu services networking)
+ #:use-module (guix gexp)
+ #:use-module (guix store)
+ #:export (%test-rabbitmq))
+
+(define %rabbitmq-os
+ (simple-operating-system
+ (dhcp-client-service)
+ (service rabbitmq-service-type)))
+
+(define* (run-rabbitmq-test #:optional (port 11211))
+ "Run tests in %RABBITMQ-OS, forwarding PORT."
+ (define os
+ (marionette-operating-system
+ %rabbitmq-os
+ #:imported-modules '((gnu services herd)
+ (guix combinators))))
+
+ (define vm
+ (virtual-machine
+ (operating-system os)
+ (port-forwardings `((11211 . ,port)))))
+
+ (define test
+ (with-imported-modules '((gnu build marionette))
+ #~(begin
+ (use-modules (srfi srfi-11) (srfi srfi-64)
+ (gnu build marionette)
+ (ice-9 rdelim))
+
+ (define marionette
+ (make-marionette (list #$vm)))
+
+ (mkdir #$output)
+ (chdir #$output)
+
+ (test-begin "rabbitmq")
+
+ ;; Wait for rabbitmq to be up and running.
+ (test-assert "service running"
+ (marionette-eval
+ '(begin
+ (use-modules (gnu services herd))
+ (match (start-service 'rabbitmq)
+ (#f #f)
+ (('service response-parts ...)
+ (match (assq-ref response-parts 'running)
+ ((pid) (number? pid))))))
+ marionette))
+
+ (test-end)
+ (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+
+ (gexp->derivation "rabbitmq-test" test))
+
+(define %test-rabbitmq
+ (system-test
+ (name "rabbitmq")
+ (description "Connect to a running RABBITMQ server.")
+ (value (run-rabbitmq-test))))
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 022d4fe16b..4b026eebd6 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -130,7 +130,8 @@ unset. When SOURCE is a directory, copy it instead of unpacking."
(define* (install-source #:key install-source? outputs #:allow-other-keys)
"Install the source code to the output directory."
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out (or (assoc-ref outputs "lib")
+ (assoc-ref outputs "out")))
(source "src")
(dest (string-append out "/" source)))
(when install-source?
@@ -208,7 +209,9 @@ on $GOBIN in the build phase."
;; https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00208.html).
;; Remove it?
(when (file-exists? "pkg")
- (copy-recursively "pkg" (string-append (assoc-ref outputs "out") "/pkg")))
+ (copy-recursively "pkg" (string-append (or (assoc-ref outputs "lib")
+ (assoc-ref outputs "out"))
+ "/pkg")))
#t)
(define* (remove-store-reference file file-name
diff --git a/guix/docker.scm b/guix/docker.scm
index c6e9c6fee5..0f917f08bc 100644
--- a/guix/docker.scm
+++ b/guix/docker.scm
@@ -197,9 +197,11 @@ SRFI-19 time-utc object, as the creation time in metadata."
;; Initialize /var/guix, assuming PREFIX points to a profile.
(install-database-and-gc-roots "." database prefix))
+ (mkdir-p "gnu/store")
(apply invoke "tar" "-cf" "layer.tar"
`(,@transformation-options
,@%tar-determinism-options
+ "gnu"
,@paths
,@(if database '("var") '())
,@(map symlink-source symlinks)))
diff --git a/guix/import/github.scm b/guix/import/github.scm
index af9f56e1dc..ef3b21ad6c 100644
--- a/guix/import/github.scm
+++ b/guix/import/github.scm
@@ -163,7 +163,19 @@ empty list."
"Return a string of the newest released version name given a string URL like
'https://github.com/arq5x/bedtools2/archive/v2.24.0.tar.gz' and the name of
the package e.g. 'bedtools2'. Return #f if there is no releases"
- (let* ((json (fetch-releases-or-tags url)))
+ (let* ((token (%github-token))
+ (releases-api-url (string-append
+ "https://api.github.com/repos/"
+ (github-user-slash-repository url)
+ "/releases"))
+ (tags-api-url (string-append
+ "https://api.github.com/repos/"
+ (github-user-slash-repository url)
+ "/tags"))
+ (json (json-fetch
+ (if token
+ (string-append tags-api-url "?access_token=" token)
+ tags-api-url))))
(if (eq? json #f)
(if (%github-token)
(error "Error downloading release information through the GitHub
@@ -172,21 +184,26 @@ API when using a GitHub token")
API. This may be fixed by using an access token and setting the environment
variable GUIX_GITHUB_TOKEN, for instance one procured from
https://github.com/settings/tokens"))
- (let loop ((releases
- (filter
- (lambda (x)
- ;; example pre-release:
- ;; https://github.com/wwood/OrfM/releases/tag/v0.5.1
- ;; or an all-prerelease set
- ;; https://github.com/powertab/powertabeditor/releases
- (not (hash-ref x "prerelease")))
- json)))
- (match releases
- (() ;empty release list
+
+ (let ((proper-releases
+ (filter
+ (lambda (x)
+ ;; example pre-release:
+ ;; https://github.com/wwood/OrfM/releases/tag/v0.5.1
+ ;; or an all-prerelease set
+ ;; https://github.com/powertab/powertabeditor/releases
+ (and (not (hash-ref x "prerelease"))
+ (string-prefix? "release_"
+ (or (hash-ref x "tag_name")
+ (hash-ref x "name")))))
+ json)))
+ (match proper-releases
+ (() ;empty release list
#f)
- ((release . rest) ;one or more releases
- (let ((tag (or (hash-ref release "tag_name") ;a "release"
- (hash-ref release "name"))) ;a tag
+
+ ((release . rest) ;one or more releases
+ (let ((tag (or (hash-ref release "tag_name")
+ (hash-ref release "name")))
(name-length (string-length package-name)))
;; some tags include the name of the package e.g. "fdupes-1.51"
;; so remove these
@@ -197,15 +214,7 @@ https://github.com/settings/tokens"))
;; some tags start with a "v" e.g. "v0.25.0"
;; where some are just the version number
(if (string-prefix? "v" tag)
- (substring tag 1)
-
- ;; Finally, reject tags that don't start with a digit:
- ;; they may not represent a release.
- (if (and (not (string-null? tag))
- (char-set-contains? char-set:digit
- (string-ref tag 0)))
- tag
- (loop rest)))))))))))
+ (substring tag 1) tag)))))))))
(define (latest-release pkg)
"Return an <upstream-source> for the latest release of PKG."
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 6cda3ccbd6..2256bd6946 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -753,13 +753,15 @@ checking this by themselves in their 'check' procedure."
(define* (system-derivation-for-action os action
#:key image-size file-system-type
- full-boot? mappings)
+ full-boot? mappings
+ container-shared-network?)
"Return as a monadic value the derivation for OS according to ACTION."
(case action
((build init reconfigure)
(operating-system-derivation os))
((container)
- (container-script os #:mappings mappings))
+ (container-script os #:mappings mappings
+ #:container-shared-network? container-shared-network?))
((vm-image)
(system-qemu-image os #:disk-image-size image-size))
((vm)
@@ -814,6 +816,7 @@ and TARGET arguments."
dry-run? derivations-only?
use-substitutes? bootloader-target target
image-size file-system-type full-boot?
+ container-shared-network?
(mappings '())
(gc-root #f))
"Perform ACTION for OS. INSTALL-BOOTLOADER? specifies whether to install
@@ -822,6 +825,8 @@ target root directory; IMAGE-SIZE is the size of the image to be built, for
the 'vm-image' and 'disk-image' actions. The root file system is created as a
FILE-SYSTEM-TYPE file system. FULL-BOOT? is used for the 'vm' action; it
determines whether to boot directly to the kernel or to the bootloader.
+CONTAINER-SHARED_NETWORK? determines if the container will use a use a
+separate network namespace.
When DERIVATIONS-ONLY? is true, print the derivation file name(s) without
building anything.
@@ -871,6 +876,7 @@ static checks."
#:file-system-type file-system-type
#:image-size image-size
#:full-boot? full-boot?
+ #:container-shared-network? container-shared-network?
#:mappings mappings))
;; For 'init' and 'reconfigure', always build BOOTCFG, even if
@@ -1006,6 +1012,8 @@ Some ACTIONS support additional ARGS.\n"))
(display (G_ "
--share=SPEC for 'vm', share host file system according to SPEC"))
(display (G_ "
+ -N, --network for 'container', allow containers to access the network"))
+ (display (G_ "
-r, --root=FILE for 'vm', 'vm-image', 'disk-image', 'container',
and 'build', make FILE a symlink to the result, and
register it as a garbage collector root"))
@@ -1050,6 +1058,9 @@ Some ACTIONS support additional ARGS.\n"))
(lambda (opt name arg result)
(alist-cons 'image-size (size->number arg)
result)))
+ (option '(#\N "network") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'container-shared-network? #t result)))
(option '("no-bootloader" "no-grub") #f #f
(lambda (opt name arg result)
(alist-cons 'install-bootloader? #f result)))
@@ -1160,6 +1171,9 @@ resulting from command-line parsing."
#:file-system-type (assoc-ref opts 'file-system-type)
#:image-size (assoc-ref opts 'image-size)
#:full-boot? (assoc-ref opts 'full-boot?)
+ #:container-shared-network? (assoc-ref
+ opts
+ 'container-shared-network?)
#:mappings (filter-map (match-lambda
(('file-system-mapping . m)
m)