gnu: Add iml.
[jackhill/guix/guix.git] / gnu / packages / fabric-management.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Dave Love <fx@gnu.org>
3 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages fabric-management)
22 #:use-module (guix packages)
23 #:use-module (guix licenses)
24 #:use-module (guix download)
25 #:use-module (guix utils)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages bison)
30 #:use-module (gnu packages flex)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages graphviz)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages swig)
37 #:use-module (gnu packages tcl))
38
39 ;; Fixme: Done for the library, but needs support for running the daemon
40 ;; (shepherd definition).
41 ;; We should probably have a lib output, but that currently generates
42 ;; a cycle.
43 (define-public opensm
44 (package
45 (name "opensm")
46 (version "3.3.21")
47 (source
48 (origin
49 (method url-fetch)
50 (uri
51 (string-append "https://github.com/linux-rdma/opensm/releases/download/"
52 version "/opensm-" version ".tar.gz"))
53 (sha256
54 (base32 "0j4vp118w1l47vs4had46ynybklyacxjlya0r15jg0y01l4j9l2h"))))
55 (build-system gnu-build-system)
56 (native-inputs
57 `(("bison" ,bison)
58 ("flex" ,flex)
59
60 ;; The 3.3.21 'release' tarball isn't properly bootstrapped.
61 ("autoconf" ,autoconf)
62 ("automake" ,automake)
63 ("libtool" ,libtool)))
64 (inputs
65 `(("rdma-core" ,rdma-core)))
66 (arguments
67 `(#:configure-flags '("--disable-static")
68 #:phases
69 (modify-phases %standard-phases
70 (add-after 'install 'install-doc
71 (lambda* (#:key outputs #:allow-other-keys)
72 (let* ((base (assoc-ref outputs "out"))
73 (doc (string-append base "/share/doc/"
74 ,name "-" ,version)))
75 (for-each (lambda (file)
76 (install-file file doc))
77 (find-files "doc"))
78 #t))))))
79 (home-page "https://www.openfabrics.org/")
80 (synopsis "OpenIB InfiniBand Subnet Manager and management utilities")
81 (description "\
82 OpenSM is the OpenIB project's Subnet Manager for Infiniband networks.
83 The subnet manager is run as a system daemon on one of the machines in
84 the infiniband fabric to manage the fabric's routing state. This package
85 also contains various tools for diagnosing and testing Infiniband networks
86 that can be used from any machine and do not need to be run on a machine
87 running the opensm daemon.")
88 (license (list gpl2 bsd-2))))
89
90 (define-public infiniband-diags
91 (package
92 (name "infiniband-diags")
93 (version "2.0.0")
94 (source
95 (origin
96 (method url-fetch)
97 (uri (string-append "https://github.com/linux-rdma/infiniband-diags/archive/"
98 version ".tar.gz"))
99 (file-name (string-append name "-" version ".tar.gz"))
100 (sha256
101 (base32 "1ns9sjwvxnklhi47d6k5x8kxdk1n7f5362y45xwxqmr7gwfvpmwa"))))
102 (build-system gnu-build-system)
103 (inputs
104 `(("rdma-core" ,rdma-core)
105 ("opensm" ,opensm)
106 ("glib" ,glib)))
107 (outputs '("out" "lib"))
108 (native-inputs
109 ;; FIXME: needs rst2man for man pages
110 `(("autoconf" ,autoconf)
111 ("automake" ,automake)
112 ("libtool" ,libtool)
113 ("perl" ,perl)
114 ("pkg-config" ,pkg-config)))
115 (arguments
116 '(#:configure-flags
117 (list (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "opensm")
118 "/include/infiniband")
119 (string-append "--with-perl-installdir=" (assoc-ref %outputs "lib")
120 "/lib/perl5/vendor_perl")
121 "--disable-static")
122 #:phases
123 (modify-phases %standard-phases
124 (add-after 'install 'licence
125 (lambda _
126 (let ((doc (string-append (assoc-ref %outputs "lib") "/share/doc")))
127 (mkdir-p doc)
128 (install-file "COPYING" doc))))
129 (add-after 'install-file 'move-perl
130 ;; Avoid perl in lib closure
131 (lambda _
132 (let ((perlout (string-append (assoc-ref %outputs "out") "/lib"))
133 (perlin (string-append (assoc-ref %outputs "lib")
134 "/lib/perl5")))
135 (mkdir-p perlout)
136 (rename-file perlin perlout)
137 #t))))))
138 (home-page "https://github.com/linux-rdma/infiniband-diags")
139 (synopsis "Infiniband diagnostic tools")
140 (description "This is a set of command-line utilities to help configure,
141 debug, and maintain Infiniband (IB) fabrics.
142
143 In addition to the utilities, a sub-library, @file{libibnetdisc}, is provided
144 to scan an entire IB fabric and return data structures representing it. The
145 interface to this library is not guaranteed to be stable.")
146 (license (list gpl2 bsd-2)))) ; dual
147
148 (define-public ibutils
149 (package
150 (name "ibutils")
151 (version "1.5.7-0.2.gbd7e502")
152 (source
153 (origin
154 (method url-fetch)
155 (uri (string-append "https://www.openfabrics.org/downloads/ibutils/ibutils-"
156 version ".tar.gz"))
157 (sha256
158 (base32 "00x7v6cf8l5y6g9xwh1sg738ch42fhv19msx0h0090nhr0bv98v7"))))
159 (build-system gnu-build-system)
160 (inputs `(("graphviz" ,graphviz)
161 ("tcl" ,tcl)
162 ("tk" ,tk)
163 ("infiniband-diags" ,infiniband-diags)
164 ("rdma-core" ,rdma-core)
165 ("opensm" ,opensm)
166 ("perl" ,perl)))
167 (native-inputs `(("swig" ,swig)))
168 (arguments
169 `(#:configure-flags
170 (list (string-append "--with-osm=" (assoc-ref %build-inputs "opensm"))
171 (string-append "--with-tk-lib=" (assoc-ref %build-inputs "tk") "/lib")
172 "--disable-static")))
173 (synopsis "InfiniBand network utilities")
174 (description "These command-line utilities allow for diagnosing and
175 testing InfiniBand networks.")
176 (home-page "https://www.openfabrics.org/downloads/ibutils/")
177 (license bsd-2)))