You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.9 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
  3. ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
  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. (define-module (gnu packages scsi)
  20. #:use-module ((guix licenses)
  21. #:select (gpl2+ bsd-2 bsd-3))
  22. #:use-module (guix packages)
  23. #:use-module (guix download)
  24. #:use-module (guix build-system gnu))
  25. (define-public sg3-utils
  26. (package
  27. (name "sg3-utils")
  28. (version "1.45")
  29. (source (origin
  30. (method url-fetch)
  31. (uri (string-append "http://sg.danny.cz/sg/p/sg3_utils-"
  32. version ".tar.xz"))
  33. (sha256
  34. (base32
  35. "1vmjb17y33a73sv7jg8fzs6bhr7yh2k9sba81sjiyf1pvi3vbnn7"))))
  36. (build-system gnu-build-system)
  37. (home-page "http://sg.danny.cz/sg/sg3_utils.html")
  38. (synopsis "SCSI device utilities")
  39. (description
  40. "sg3-utils is a collection of utilities for devices that use the Small
  41. Computer System Interface (@dfn{SCSI}) command set. It includes utilities to
  42. read data from, write data to, control, modify, and query the state of SCSI
  43. devices.
  44. For example, this package provides command-line tools to:
  45. @itemize
  46. @item copy data based on @code{dd} syntax and semantics (called @command{sg_dd},
  47. @command{sgp_dd}, and @command{sgm_dd})
  48. @item check @code{INQUIRY} data and @code{VPD pages} (@command{sg_inq})
  49. @item check mode and log pages (@command{sginfo}, @command{sg_modes}, and
  50. @command{sg_logs})
  51. @item spin up and down disks (@command{sg_start})
  52. @item do self-tests (@code{sg_senddiag})
  53. @item parse sense data (@code{sg_decode_sense})
  54. @item and perform various other functions.
  55. @end itemize
  56. In addition, this package includes a library, called libsgutils, which can be
  57. used in C and C++ programs to interact with SCSI devices.")
  58. ;; See README: "All utilities and libraries have either a "2 clause" BSD
  59. ;; license or are "GPL-2ed". [...] That BSD license was updated from the
  60. ;; "3 clause" to the newer "2 clause" version on 20180119. To save space
  61. ;; various source code files refer to a file called "BSD_LICENSE" [...]."
  62. ;; Some files (like sg_compare_and_write.c) retain their 3-clause headers!
  63. (license (list gpl2+ bsd-2 bsd-3))))