projects/guix·blob java-team · refs

122 lines · 5.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Chris Marusich <[email protected]>
3;;; Copyright © 2018, 2020, 2021 Tobias Geerinckx-Rice <[email protected]>
4;;; Copyright © 2021 Noisytoot <[email protected]>
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 scsi)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages autotools))
28
29(define-public sg3-utils
30 (package
31 (name "sg3-utils")
32 (version "1.48")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "https://sg.danny.cz/sg/p/sg3_utils-"
36 version ".tar.xz"))
37 (sha256
38 (base32
39 "1ynv6kijzjj8xab3z87nks26qcrpvg46mhlr3s6yah6mj0ba9ffn"))))
40 (build-system gnu-build-system)
41 (arguments
42 `(#:configure-flags
43 (list "--disable-static")))
44 (home-page "https://sg.danny.cz/sg/sg3_utils.html")
45 (synopsis "SCSI device utilities")
46 (description
47 "sg3-utils is a collection of utilities for devices that use the Small
48Computer System Interface (@dfn{SCSI}) command set. It includes utilities to
49read data from, write data to, control, modify, and query the state of SCSI
50devices.
51
52For example, this package provides command-line tools to:
53@itemize
54@item copy data based on @code{dd} syntax and semantics (called @command{sg_dd},
55@command{sgp_dd}, and @command{sgm_dd})
56@item check @code{INQUIRY} data and @code{VPD pages} (@command{sg_inq})
57@item check mode and log pages (@command{sginfo}, @command{sg_modes}, and
58@command{sg_logs})
59@item spin up and down disks (@command{sg_start})
60@item do self-tests (@code{sg_senddiag})
61@item parse sense data (@code{sg_decode_sense})
62@item and perform various other functions.
63@end itemize
64
65In addition, this package includes a library, called libsgutils, which can be
66used in C and C++ programs to interact with SCSI devices.")
67 ;; See README: "All utilities and libraries have either a "2 clause" BSD
68 ;; license or are "GPL-2ed". [...] That BSD license was updated from the
69 ;; "3 clause" to the newer "2 clause" version on 20180119. To save space
70 ;; various source code files refer to a file called "BSD_LICENSE" [...]."
71 ;; Some files (like sg_compare_and_write.c) retain their 3-clause headers!
72 (license (list license:gpl2+ license:bsd-2 license:bsd-3))))
73
74(define-public libiscsi
75 (package
76 (name "libiscsi")
77 (version "1.19.0")
78 (source
79 (origin
80 (method git-fetch)
81 (uri (git-reference
82 (url "https://github.com/sahlberg/libiscsi")
83 (commit version)))
84 (sha256
85 (base32
86 "0ajrkkg5awmi8m4b3mha7h07ylg18k252qprvk1sgq0qbyd66zy7"))
87 (file-name (git-file-name name version))))
88 (build-system gnu-build-system)
89 (native-inputs (list autoconf automake libtool))
90 (synopsis "Client-side library for iSCSI")
91 (description "Libiscsi is a client-side library to implement the iSCSI
92protocol that can be used to access the resources of an iSCSI target. It is
93fully asynchronous with regards to iSCSI commands and SCSI tasks, but a
94synchronous layer is also provided for ease of use for simpler applications.")
95 (home-page "https://github.com/sahlberg/libiscsi")
96 (license (list
97 ;; For the src, examples and test-tool directories, except
98 ;; src/ld_iscsi.c.
99 license:gpl2+
100 ;; For the lib and include directories.
101 license:lgpl2.1+))))
102
103(define-public lsscsi
104 (package
105 (name "lsscsi")
106 (version "0.32")
107 (source (origin
108 (method url-fetch)
109 (uri (string-append
110 "http://sg.danny.cz/scsi/lsscsi-" version ".tar.xz"))
111 (sha256
112 (base32
113 "0jp458m2b3wckr18qkln69i01152qlwz33zm49103lq8fgx0n6d4"))))
114 (build-system gnu-build-system)
115 (synopsis "Lists information about SCSI or NVMe devices in Linux")
116 (home-page "https://sg.danny.cz/scsi/lsscsi.html")
117 (description
118 "@command{lsscsi} lists SCSI logical units or SCSI targets. It can
119also list NVMe namespaces or controllers and show the relationship between a
120device's primary node name, its SCSI generic (sg) node name and its kernel
121name.")
122 (license license:gpl2)))