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