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