From 21332f3b8cb8f407a89cdfe7d0460a9947675872 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 15 Nov 2021 17:23:08 +0100 Subject: gnu: hpcguix-web: Update to 0.2.0. * gnu/packages/web.scm (hpcguix-web): Update to 0.2.0. [arguments]: In 'wrap-program' phase, add guile-zlib to DEPS. [native-inputs]: Add GUILE. [inputs]: Add GUILE-ZLIB, GUILE-COMMONMARK, and GUILE-JSON. [propagated-inputs]: Remove. These were pointless. * gnu/services/web.scm ()[address, port]: New fields. * doc/guix.texi (Web Services): Document them. * gnu/tests/web.scm (%hpcguix-web-os): Add 'address'. --- doc/guix.texi | 6 ++++++ gnu/packages/web.scm | 17 +++++++++-------- gnu/services/web.scm | 10 +++++++++- gnu/tests/web.scm | 5 +++-- 4 files changed, 27 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 1b10e2d626..ea0c51d11a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -26552,6 +26552,12 @@ complete example}. @item @code{package} (default: @code{hpcguix-web}) The hpcguix-web package to use. + +@item @code{address} (default: @code{"127.0.0.1"}) +The IP address to listen to. + +@item @code{port} (default: @code{5000}) +The port number to listen to. @end table @end deftp diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index a4c47f92d8..9cdbc31459 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -7668,7 +7668,7 @@ (define-public nghttp2 (define-public hpcguix-web (package (name "hpcguix-web") - (version "0.1.0") + (version "0.2.0") (source (origin (method git-fetch) (uri (git-reference @@ -7677,7 +7677,7 @@ (define-public hpcguix-web (file-name (git-file-name name version)) (sha256 (base32 - "02lz5k1hhkwfz3nr3lsd69icsz6n0q82z047d3svi09qpxw6y0cj")))) + "1l856d1vr63ns1sp9fm6v97p71mx00769k6lwzqzppsb9clksnwp")))) (build-system gnu-build-system) (arguments `(#:modules ((guix build gnu-build-system) @@ -7701,9 +7701,10 @@ (define-public hpcguix-web (git (assoc-ref inputs "guile-git")) (bs (assoc-ref inputs "guile-bytestructures")) (json (assoc-ref inputs "guile-json")) + (zlib (assoc-ref inputs "guile-zlib")) (guile-cm (assoc-ref inputs "guile-commonmark")) - (deps (list guile gcrypt git bs guile-cm guix json)) + (deps (list guile gcrypt git bs zlib guile-cm guix json)) (effective (read-line (open-pipe* OPEN_READ @@ -7728,15 +7729,15 @@ (define-public hpcguix-web `(("autoconf" ,autoconf) ("automake" ,automake) ("uglify-js" ,uglify-js) - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ("guile" ,@(assoc-ref (package-native-inputs guix) "guile")))) (inputs `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile")) ("guix" ,guix) - ("bash-minimal" ,bash-minimal))) ;for 'wrap-program' - (propagated-inputs - `(("guile" ,@(assoc-ref (package-native-inputs guix) "guile")) + ("guile-zlib" ,guile-zlib) ("guile-commonmark" ,guile-commonmark) - ("guile-json" ,guile-json-4))) + ("guile-json" ,guile-json-4) + ("bash-minimal" ,bash-minimal))) (home-page "https://github.com/UMCUGenetics/hpcguix-web") (synopsis "Web interface for cluster deployments of Guix") (description "Hpcguix-web provides a web interface to the list of packages diff --git a/gnu/services/web.scm b/gnu/services/web.scm index bb42eacf83..f1c3a2f75e 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -1110,7 +1110,9 @@ (define-record-type* (package hpcguix-web-package (default hpcguix-web)) ; ;; Specs is gexp of hpcguix-web configuration file - (specs hpcguix-web-configuration-specs)) + (specs hpcguix-web-configuration-specs) + (address hpcguix-web-configuration-address (default "127.0.0.1")) + (port hpcguix-web-configuration-port (default 5000))) (define %hpcguix-web-accounts (list (user-group @@ -1163,6 +1165,12 @@ (define (hpcguix-web-shepherd-service config) (requirement '(networking)) (start #~(make-forkexec-constructor (list #$(file-append hpcguix-web "/bin/hpcguix-web") + (string-append "--listen=" + #$(hpcguix-web-configuration-address + config)) + "-p" + #$(number->string + (hpcguix-web-configuration-port config)) (string-append "--config=" #$(scheme-file "hpcguix-web.scm" specs))) #:user "hpcguix-web" diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm index 518c9c1ff3..ccb2f53137 100644 --- a/gnu/tests/web.scm +++ b/gnu/tests/web.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017, 2020 Ludovic Courtès +;;; Copyright © 2017, 2020-2021 Ludovic Courtès ;;; Copyright © 2017, 2019 Christopher Baines ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2018 Pierre-Antoine Rouby @@ -438,7 +438,8 @@ (define %hpcguix-web-os (service dhcp-client-service-type) (service hpcguix-web-service-type (hpcguix-web-configuration - (specs %hpcguix-web-specs))))) + (specs %hpcguix-web-specs) + (address "0.0.0.0"))))) (define %test-hpcguix-web (system-test -- cgit v1.2.3