summary refs log tree commit diff
path: root/gnu/packages/parallel.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-03-08 18:11:31 +0100
committerLudovic Courtès <ludo@gnu.org>2022-03-09 23:38:17 +0100
commitd80c722034b97ea2c3a1ae1195e3fb27004cf924 (patch)
tree71174714511e5aa862287142860a13e269de6e82 /gnu/packages/parallel.scm
parentd3a7cd7acf2692bdd62fd76582003399889a7a3d (diff)
downloadguix-d80c722034b97ea2c3a1ae1195e3fb27004cf924.tar.gz
gnu: slurm: Use gexps and remove input labels.
* gnu/packages/parallel.scm (slurm)[source]: Remove trailing #t.
[native-inputs]: Remove labels.
[arguments]: Rewrite as gexps.  Use 'this-package-input' instead of
'%build-inputs'.
(slurm-20.02)[arguments]: Adjust accordingly.
Diffstat (limited to 'gnu/packages/parallel.scm')
-rw-r--r--gnu/packages/parallel.scm160
1 files changed, 78 insertions, 82 deletions
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 1e4ca2f03c..5f84fb6777 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -38,6 +38,7 @@
   #:use-module ((guix utils) #:select (target-64bit?))
   #:use-module (guix packages)
   #:use-module (guix utils)
+  #:use-module (guix gexp)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
@@ -164,93 +165,88 @@ when jobs finish.")
 
 (define-public slurm
   (package
-   (name "slurm")
-   (version "20.11.7")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append
-                  "https://download.schedmd.com/slurm/slurm-"
-                  version ".tar.bz2"))
-            (sha256
-             (base32
-              "1fdjihg1x7ks5l77yjv14a4mg6r0v8c3zk1dcxkhrhq3n4dc9nbs"))
-            (modules '((guix build utils)))
-            (snippet
-             '(begin
-                ;; According to
-                ;; <https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00534.html>
-                ;; there are non-free bits under contribs/, though it's not
-                ;; clear which ones.  libpmi is clearly free (it used to be
-                ;; under src/api/), so remove all of contribs/ except
-                ;; contribs/pmi/.
-                (substitute* "configure.ac"
-                  (("^[[:space:]]+contribs/(.*)$" all directory)
-                   (if (and (string-prefix? "pmi" directory)
-                            (not (string-prefix? "pmi2" directory)))
-                       all
-                       "")))
+    (name "slurm")
+    (version "20.11.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.schedmd.com/slurm/slurm-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "1fdjihg1x7ks5l77yjv14a4mg6r0v8c3zk1dcxkhrhq3n4dc9nbs"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; According to
+                  ;; <https://lists.gnu.org/archive/html/guix-devel/2016-02/msg00534.html>
+                  ;; there are non-free bits under contribs/, though it's not
+                  ;; clear which ones.  libpmi is clearly free (it used to be
+                  ;; under src/api/), so remove all of contribs/ except
+                  ;; contribs/pmi/.
+                  (substitute* "configure.ac"
+                    (("^[[:space:]]+contribs/(.*)$" all directory)
+                     (if (and (string-prefix? "pmi" directory)
+                              (not (string-prefix? "pmi2" directory)))
+                         all
+                         "")))
 
-                (rename-file "contribs/pmi" "tmp-pmi")
-                (delete-file-recursively "contribs")
-                (mkdir "contribs")
-                (rename-file "tmp-pmi" "contribs/pmi")
-                #t))))
-   ;; FIXME: More optional inputs could be added,
-   ;; in particular mysql and gtk+.
-   (inputs (list freeipmi
-                 `(,hwloc-2 "lib")
-                 json-c
-                 linux-pam
-                 munge
-                 numactl
-                 readline))
-   (native-inputs
-    `(("autoconf" ,autoconf)
-      ("expect" ,expect)
-      ("perl" ,perl)
-      ("pkg-config" ,pkg-config)
-      ("python" ,python-wrapper)))
-   (build-system gnu-build-system)
-   (arguments
-    `(#:configure-flags
-      (list "--enable-pam" "--sysconfdir=/etc/slurm"
-            "--disable-static"
-            (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi"))
-            (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))
-            (string-append "--with-json=" (assoc-ref %build-inputs "json-c"))
-            (string-append "--with-munge=" (assoc-ref %build-inputs "munge"))
+                  (rename-file "contribs/pmi" "tmp-pmi")
+                  (delete-file-recursively "contribs")
+                  (mkdir "contribs")
+                  (rename-file "tmp-pmi" "contribs/pmi")))))
+    ;; FIXME: More optional inputs could be added,
+    ;; in particular mysql and gtk+.
+    (inputs (list freeipmi
+                  `(,hwloc-2 "lib")
+                  json-c
+                  linux-pam
+                  munge
+                  numactl
+                  readline))
+    (native-inputs
+     (list autoconf expect perl pkg-config python-wrapper))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:configure-flags
+           #~(list "--enable-pam" "--sysconfdir=/etc/slurm"
+                   "--disable-static"
+                   (string-append "--with-freeipmi=" #$(this-package-input "freeipmi"))
+                   (string-append "--with-hwloc=" #$(this-package-input "hwloc"))
+                   (string-append "--with-json=" #$(this-package-input "json-c"))
+                   (string-append "--with-munge=" #$(this-package-input "munge"))
 
-            ;; 32-bit support is marked as deprecated and needs to be
-            ;; explicitly enabled.
-            ,@(if (target-64bit?) '() '("--enable-deprecated")))
-      #:phases
-      (modify-phases %standard-phases
-        (add-after 'unpack 'patch-plugin-linker-flags
-          (lambda _
-            (substitute* (find-files "src/plugins/" "Makefile.in")
-              (("_la_LDFLAGS = ")
-               "_la_LDFLAGS = ../../../api/libslurm.la "))))
-        (add-after 'patch-plugin-linker-flags 'autoconf
-          (lambda _ (invoke "autoconf")))         ;configure.ac was patched
-        (add-after 'install 'install-libpmi
-          (lambda _
-            ;; Open MPI expects libpmi to be provided by Slurm so install it.
-            (invoke "make" "install" "-C" "contribs/pmi"))))))
-   (home-page "https://slurm.schedmd.com/")
-   (synopsis "Workload manager for cluster computing")
-   (description
-    "SLURM is a fault-tolerant and highly scalable cluster management and job
+                   ;; 32-bit support is marked as deprecated and needs to be
+                   ;; explicitly enabled.
+                   #$@(if (target-64bit?) '() '("--enable-deprecated")))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'patch-plugin-linker-flags
+                 (lambda _
+                   (substitute* (find-files "src/plugins/" "Makefile.in")
+                     (("_la_LDFLAGS = ")
+                      "_la_LDFLAGS = ../../../api/libslurm.la "))))
+               (add-after 'patch-plugin-linker-flags 'autoconf
+                 (lambda _ (invoke "autoconf")))  ;configure.ac was patched
+               (add-after 'install 'install-libpmi
+                 (lambda _
+                   ;; Open MPI expects libpmi to be provided by Slurm so install it.
+                   (invoke "make" "install" "-C" "contribs/pmi"))))))
+    (home-page "https://slurm.schedmd.com/")
+    (synopsis "Workload manager for cluster computing")
+    (description
+     "SLURM is a fault-tolerant and highly scalable cluster management and job
 scheduling system for large and small clusters.  It allocates access to
 resources (computer nodes) to users for some duration of time, provides a
 framework for starting, executing, and monitoring work (typically a parallel
 job) on a set of allocated nodes, and arbitrates contention for resources
 by managing a queue of pending work.")
-   (license (list license:bsd-2       ; src/common/log.[ch], src/common/uthash
-                  license:expat       ; slurm/pmi.h
-                  license:isc         ; src/common/strlcpy.c
-                  license:lgpl2.1+    ; hilbert.[ch], src/common/slurm_time.h
-                  license:zlib        ; src/common/strnatcmp.c
-                  license:gpl2+))))   ; the rest, often with OpenSSL exception
+    (license (list license:bsd-2      ; src/common/log.[ch], src/common/uthash
+                   license:expat      ; slurm/pmi.h
+                   license:isc        ; src/common/strlcpy.c
+                   license:lgpl2.1+   ; hilbert.[ch], src/common/slurm_time.h
+                   license:zlib       ; src/common/strnatcmp.c
+                   license:gpl2+))))   ; the rest, often with OpenSSL exception
 
 ;; The SLURM client/daemon protocol and file format changes from time to time
 ;; in incompatible ways, as noted in
@@ -275,8 +271,8 @@ by managing a queue of pending work.")
     (arguments
      (substitute-keyword-arguments (package-arguments slurm)
        ((#:configure-flags flags ''())
-        `(append '("CFLAGS=-O2 -g -fcommon" "LDFLAGS=-fcommon")
-                 ,flags))))))
+        #~(append '("CFLAGS=-O2 -g -fcommon" "LDFLAGS=-fcommon")
+                  #$flags))))))
 
 (define-public slurm-19.05
   (package