gnu: shadow: Return #t from all phases.
[jackhill/guix/guix.git] / gnu / packages / parallel.scm
CommitLineData
e3aaefe7 1;;; GNU Guix --- Functional package management for GNU
552f5c00 2;;; Copyright © 2013, 2014 Eric Bavier <bavier@member.fsf.org>
ff03ef0b 3;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
830383cb 4;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
552f5c00
PP
5;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
6;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
524eee02 7;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
47bc991f 8;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
035ee04b 9;;; Copyright © 2017, 2018 Rutger Helling <rhelling@mykolab.com>
4ff22ec3 10;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
e3aaefe7
EB
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages parallel)
e3aaefe7 28 #:use-module (guix build-system gnu)
552f5c00
PP
29 #:use-module (guix download)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
e3aaefe7 32 #:use-module (gnu packages)
552f5c00
PP
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages autotools)
524eee02 35 #:use-module (gnu packages base)
552f5c00
PP
36 #:use-module (gnu packages freeipmi)
37 #:use-module (gnu packages linux)
38 #:use-module (gnu packages mpi)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages python)
42 #:use-module (gnu packages readline)
43 #:use-module (gnu packages tcl)
44 #:use-module (gnu packages tls)
45 #:use-module (gnu packages web))
e3aaefe7
EB
46
47(define-public parallel
48 (package
49 (name "parallel")
035ee04b 50 (version "20180422")
e3aaefe7
EB
51 (source
52 (origin
53 (method url-fetch)
54 (uri (string-append "mirror://gnu/parallel/parallel-"
55 version ".tar.bz2"))
56 (sha256
57 (base32
035ee04b 58 "0xsfpbxwgd4197gra981iv0nmjfk58c0d88dxx6dh6yrqz523klx"))))
e3aaefe7 59 (build-system gnu-build-system)
47bc991f
BW
60 (arguments
61 `(#:phases
62 (modify-phases %standard-phases
63 (add-after 'unpack 'patch-bin-sh
64 (lambda _
65 (for-each
66 (lambda (file)
67 (substitute* file
68 ;; Patch hard coded '/bin/sh' in the lin ending in:
69 ;; $Global::shell = $ENV{'PARALLEL_SHELL'} ||
70 ;; parent_shell($$) || $ENV{'SHELL'} || "/bin/sh";
71 (("/bin/sh\\\";\n$") (string-append (which "sh") "\";\n"))
72 ;; Patch call to 'ps' and 'perl' commands.
73 ((" ps ") (string-append " " (which "ps") " "))
74 ((" perl -") (string-append " " (which "perl") " -"))))
fccab993
EF
75 (list "src/parallel" "src/sem"))
76 #t))
47bc991f
BW
77 (add-after 'install 'post-install-test
78 (lambda* (#:key outputs #:allow-other-keys)
28b0b21e
TGR
79 (invoke (string-append
80 (assoc-ref outputs "out") "/bin/parallel")
81 "echo"
82 ":::" "1" "2" "3"))))))
47bc991f
BW
83 (inputs
84 `(("perl" ,perl)
85 ("procps" ,procps)))
fccab993 86 (home-page "https://www.gnu.org/software/parallel/")
e3aaefe7
EB
87 (synopsis "Build and execute command lines in parallel")
88 (description
89 "GNU Parallel is a tool for executing shell jobs in parallel using one
90or more computers. Jobs can consist of single commands or of scripts
91and they are executed on lists of files, hosts, users or other items.")
552f5c00
PP
92 (license license:gpl3+)))
93
94(define-public slurm
95 (package
96 (name "slurm")
6e076b3d 97 (version "17.11.3")
552f5c00
PP
98 (source (origin
99 (method url-fetch)
100 (uri (string-append
ea1f073d
LF
101 "https://download.schedmd.com/slurm/slurm-"
102 version ".tar.bz2"))
552f5c00
PP
103 (sha256
104 (base32
6e076b3d 105 "1x3i6z03d9m46fvj1cslrapm1drvgyqch9pn4xf23kvbz4gkhaps"))
552f5c00
PP
106 (modules '((guix build utils)))
107 (snippet
108 '(begin
4ff22ec3
TGR
109 (substitute* "configure.ac"
110 (("^[[:space:]]+contribs/.*$") ""))
552f5c00
PP
111 (delete-file-recursively "contribs")
112 #t))))
113 ;; FIXME: More optional inputs could be added,
114 ;; in particular mysql and gtk+.
115 (inputs `(("expect" ,expect)
116 ("freeipmi" ,freeipmi)
798b7678 117 ("hwloc" ,hwloc "lib")
552f5c00
PP
118 ("json-c" ,json-c)
119 ("linux-pam" , linux-pam)
120 ("munge" ,munge)
121 ("numactl" ,numactl)
122 ("openssl" ,openssl)
123 ("perl" ,perl)
124 ("python" ,python-wrapper)
125 ("readline" ,readline)))
126 (native-inputs
127 `(("autoconf" ,autoconf)
128 ("pkg-config" ,pkg-config)))
129 (build-system gnu-build-system)
130 (arguments
131 `(#:configure-flags
132 (list "--enable-pam"
133 (string-append "--with-freeipmi=" (assoc-ref %build-inputs "freeipmi"))
134 (string-append "--with-hwloc=" (assoc-ref %build-inputs "hwloc"))
135 (string-append "--with-json=" (assoc-ref %build-inputs "json-c"))
136 (string-append "--with-munge=" (assoc-ref %build-inputs "munge"))
137 (string-append "--with-ssl=" (assoc-ref %build-inputs "openssl")))
138 #:phases
139 (modify-phases %standard-phases
4ff22ec3
TGR
140 (add-after 'unpack 'autoconf
141 (lambda _ (invoke "autoconf")))))) ; configure.ac was patched
91257587 142 (home-page "https://slurm.schedmd.com/")
552f5c00
PP
143 (synopsis "Workload manager for cluster computing")
144 (description
145 "SLURM is a fault-tolerant and highly scalable cluster management and job
146scheduling system for large and small clusters. It allocates access to
147resources (computer nodes) to users for some duration of time, provides a
148framework for starting, executing, and monitoring work (typically a parallel
149job) on a set of allocated nodes, and arbitrates contention for resources
150by managing a queue of pending work.")
70260b33
TGR
151 (license (list license:bsd-2 ; src/common/log.[ch], src/common/uthash
152 license:expat ; slurm/pmi.h
153 license:isc ; src/common/strlcpy.c
154 license:lgpl2.1+ ; hilbert.[ch], src/common/slurm_time.h
155 license:zlib ; src/common/strnatcmp.c
156 license:gpl2+)))) ; the rest, often with OpenSSL exception
524eee02
RW
157
158(define-public slurm-drmaa
159 (package
160 (name "slurm-drmaa")
161 (version "1.0.7")
162 (source (origin
163 (method url-fetch)
164 (uri "http://apps.man.poznan.pl/trac/slurm-drmaa/downloads/9")
165 (file-name (string-append name "-" version ".tar.gz"))
166 (sha256
167 (base32
168 "0grw55hmny2mc4nc0y1arnvxd2k0dcdfn476kzs180fibjxgfw14"))))
169 (build-system gnu-build-system)
170 (inputs
171 `(("slurm" ,slurm)))
172 (native-inputs
173 `(("which" ,which)))
174 (home-page "http://apps.man.poznan.pl/trac/slurm-drmaa")
175 (synopsis "Distributed resource management application API for SLURM")
176 (description
177 "PSNC DRMAA for Simple Linux Utility for Resource Management (SLURM) is
178an implementation of Open Grid Forum DRMAA 1.0 (Distributed Resource
179Management Application API) specification for submission and control of jobs
180to SLURM. Using DRMAA, grid applications builders, portal developers and ISVs
181can use the same high-level API to link their software with different
182cluster/resource management systems.")
183 (license license:gpl3+)))