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>
6 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
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
51 (string-append "https://github.com/linux-rdma/opensm/releases/download/"
52 version "/opensm-" version ".tar.gz"))
54 (base32 "0j4vp118w1l47vs4had46ynybklyacxjlya0r15jg0y01l4j9l2h"))))
55 (build-system gnu-build-system)
60 ;; The 3.3.21 'release' tarball isn't properly bootstrapped.
61 ("autoconf" ,autoconf)
62 ("automake" ,automake)
63 ("libtool" ,libtool)))
65 `(("rdma-core" ,rdma-core)))
67 `(#:configure-flags '("--disable-static")
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/"
75 (for-each (lambda (file)
76 (install-file file doc))
79 (home-page "https://www.openfabrics.org/")
80 (synopsis "OpenIB InfiniBand Subnet Manager and management utilities")
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))))
90 (define-public infiniband-diags
92 (name "infiniband-diags")
97 (uri (string-append "https://github.com/linux-rdma/infiniband-diags/archive/"
99 (file-name (string-append name "-" version ".tar.gz"))
101 (base32 "1ns9sjwvxnklhi47d6k5x8kxdk1n7f5362y45xwxqmr7gwfvpmwa"))))
102 (build-system gnu-build-system)
104 `(("rdma-core" ,rdma-core)
107 (outputs '("out" "lib"))
109 ;; FIXME: needs rst2man for man pages
110 `(("autoconf" ,autoconf)
111 ("automake" ,automake)
114 ("pkg-config" ,pkg-config)))
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")
123 (modify-phases %standard-phases
124 (add-after 'install 'licence
126 (let ((doc (string-append (assoc-ref %outputs "lib") "/share/doc")))
128 (install-file "COPYING" doc))))
129 (add-after 'install-file 'move-perl
130 ;; Avoid perl in lib closure
132 (let ((perlout (string-append (assoc-ref %outputs "out") "/lib"))
133 (perlin (string-append (assoc-ref %outputs "lib")
136 (rename-file perlin perlout)
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.
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
148 (define-public ibutils
151 (version "1.5.7-0.2.gbd7e502")
155 (uri (string-append "https://www.openfabrics.org/downloads/ibutils/ibutils-"
158 (base32 "00x7v6cf8l5y6g9xwh1sg738ch42fhv19msx0h0090nhr0bv98v7"))))
159 (build-system gnu-build-system)
160 (inputs `(("graphviz" ,graphviz)
163 ("infiniband-diags" ,infiniband-diags)
164 ("rdma-core" ,rdma-core)
167 (native-inputs `(("swig" ,swig)))
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/")