fabric-management.scm 6.7 KB

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