gnu: Add python-pytest-helpers-namespace.
[jackhill/guix/guix.git] / gnu / packages / parallel.scm
index f7e95bc..05964cd 100644 (file)
@@ -1,15 +1,17 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Eric Bavier <bavier@member.fsf.org>
+;;; Copyright © 2013, 2014, 2020 Eric Bavier <bavier@posteo.net>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2016, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
-;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
+;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -32,7 +34,9 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module ((guix utils) #:select (target-64bit?))
   #:use-module (guix packages)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
@@ -43,6 +47,7 @@
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tcl)
 (define-public parallel
   (package
     (name "parallel")
-    (version "20191022")
+    (version "20210322")
     (source
      (origin
       (method url-fetch)
       (uri (string-append "mirror://gnu/parallel/parallel-"
                           version ".tar.bz2"))
       (sha256
-       (base32 "1a89x5ix9kls1abj8zkgxdf3g3s5phzb83xcd4cwpz4szfjfw6v4"))))
+       (base32 "152np0jg4n94sbl2p2fzxjfnssiyp5sg7r5wx6s8p893b921pxwq"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -102,10 +107,38 @@ or more computers.  Jobs can consist of single commands or of scripts
 and they are executed on lists of files, hosts, users or other items.")
     (license license:gpl3+)))
 
+(define-public xe
+  (package
+    (name "xe")
+    (version "0.11")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/leahneukirchen/xe")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "04jr8f6jcijr0bsmn8ajm0aj35qh9my3xjsaq64h8lwg5bpyn29x"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                          (string-append "PREFIX=" %output))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure))))
+    (synopsis "Execute a command for every argument")
+    (description
+     "The xe utility constructs command lines from specified arguments,
+combining some of the best features of xargs(1) and apply(1).  Parallel
+execution is also possible.")
+    (home-page "https://github.com/leahneukirchen/xe")
+    (license license:public-domain)))
+
 (define-public slurm
   (package
    (name "slurm")
-   (version "19.05.3-2")
+   (version "20.11.3")
    (source (origin
             (method url-fetch)
             (uri (string-append
@@ -113,7 +146,7 @@ and they are executed on lists of files, hosts, users or other items.")
                   version ".tar.bz2"))
             (sha256
              (base32
-              "0qj4blfymrd2ry2qmb58l3jbr4jwygc3adcfw7my27rippcijlyc"))
+              "1s70x6yh60sx63dgmp5rlhq8jcz7kxv9pk8gbs9v1jg8zps5h5bk"))
             (modules '((guix build utils)))
             (snippet
              '(begin
@@ -137,27 +170,32 @@ and they are executed on lists of files, hosts, users or other items.")
                 #t))))
    ;; FIXME: More optional inputs could be added,
    ;; in particular mysql and gtk+.
-   (inputs `(("expect" ,expect)
-             ("freeipmi" ,freeipmi)
-             ("hwloc" ,hwloc "lib")
+   (inputs `(("freeipmi" ,freeipmi)
+             ("hwloc" ,hwloc-2 "lib")
              ("json-c" ,json-c)
              ("linux-pam" , linux-pam)
              ("munge" ,munge)
              ("numactl" ,numactl)
-             ("perl" ,perl)
-             ("python" ,python-wrapper)
              ("readline" ,readline)))
    (native-inputs
     `(("autoconf" ,autoconf)
-      ("pkg-config" ,pkg-config)))
+      ("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")))
+            (string-append "--with-munge=" (assoc-ref %build-inputs "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 'autoconf
@@ -182,23 +220,75 @@ by managing a queue of pending work.")
                   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
+;; <https://slurm.schedmd.com/troubleshoot.html#network>.  Thus, keep older
+;; releases here.  See also <https://issues.guix.gnu.org/44387>.
+;; As noted in the link, YY.MM is the release scheme, and the 'maintenance'
+;; digit does not introduce incompatibilities.
+
+(define-public slurm-20.02
+  (package
+    (inherit slurm)
+    (version "20.02.6-1")
+    (source (origin
+              (inherit (package-source slurm))
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.schedmd.com/slurm/slurm-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "0qj4blfymrd2ry2qmb58l3jbr4jwygc3adcfw7my27rippcijlyc"))))))
+
+(define-public slurm-19.05
+  (package
+    (inherit slurm)
+    (version "19.05.8")
+    (source (origin
+              (inherit (package-source slurm))
+              (method url-fetch)
+              (uri (string-append
+                    "https://download.schedmd.com/slurm/slurm-"
+                    version ".tar.bz2"))
+              (sha256
+               (base32
+                "10c9j4a9a6d4ibpf75006mn03p8xgpaprc247x2idakysjf2fw43"))))))
+
+;; Same as Debian 10
+(define-public slurm-18.08
+  (package
+    (inherit slurm)
+    (version "18.08.9")
+    (source
+      (origin
+        (inherit (package-source slurm))
+        (uri (string-append
+               "https://download.schedmd.com/slurm/slurm-"
+               version ".tar.bz2"))
+        (sha256
+         (base32
+          "1bgrpz75m7l4xhirsd0fvnkzlkrl8v2qpmjcz60barc5qm2kn457"))))))
+
 (define-public slurm-drmaa
   (package
     (name "slurm-drmaa")
-    (version "1.0.7")
+    (version "1.1.2")
     (source (origin
               (method url-fetch)
-              (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9")
-              (file-name (string-append name "-" version ".tar.gz"))
+              (uri (string-append
+                    "https://github.com/natefoo/slurm-drmaa/releases/download/"
+                    version "/slurm-drmaa-" version ".tar.gz"))
               (sha256
                (base32
-                "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14"))))
+                "0dn8ypqxdaq3k4jqwwx7msckxnmr6n2z5j68yffp50yy07ajbzjv"))))
     (build-system gnu-build-system)
+    (arguments `(#:tests? #f)) ; The tests require "bats".
     (inputs
      `(("slurm" ,slurm)))
     (native-inputs
      `(("which" ,which)))
-    (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa")
+    (home-page "https://github.com/natefoo/slurm-drmaa")
     (synopsis "Distributed resource management application API for SLURM")
     (description
      "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is