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.
 
 
 
 
 
 

76 lines
2.9 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
  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 lsof)
  19. #:use-module ((guix licenses)
  20. #:renamer (symbol-prefix-proc 'license:))
  21. #:use-module (guix packages)
  22. #:use-module (guix download)
  23. #:use-module (guix build-system gnu)
  24. #:use-module (gnu packages perl))
  25. (define-public lsof
  26. (package
  27. (name "lsof")
  28. (version "4.87")
  29. (source (origin
  30. (method url-fetch)
  31. (uri (string-append "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_"
  32. version ".tar.bz2"))
  33. (sha256 (base32
  34. "0b6si72sml7gr9784ak491cxxbm9mx5bh174yg6rrirbv04kgpfz"))))
  35. (build-system gnu-build-system)
  36. (inputs `(("perl" ,perl)))
  37. (arguments
  38. `(#:tests? #f ; no test target
  39. #:phases
  40. (alist-replace
  41. 'unpack
  42. (lambda* (#:key source name version #:allow-other-keys)
  43. (let ((unpack (assoc-ref %standard-phases 'unpack)))
  44. (apply unpack (list #:source source))
  45. (apply unpack (list #:source (car (find-files "." "\\.tar$"))))))
  46. (alist-replace
  47. 'configure
  48. (lambda* (#:key #:allow-other-keys)
  49. (setenv "LSOF_CC" "gcc")
  50. (setenv "LSOF_MAKE" "make")
  51. (system* "./Configure" "linux"))
  52. (alist-replace
  53. 'install
  54. (lambda* (#:key outputs #:allow-other-keys)
  55. (let ((out (assoc-ref outputs "out")))
  56. (mkdir out)
  57. (mkdir (string-append out "/bin"))
  58. (copy-file "lsof" (string-append out "/bin/lsof"))
  59. (mkdir (string-append out "/share"))
  60. (mkdir (string-append out "/share/man"))
  61. (mkdir (string-append out "/share/man/man8"))
  62. (copy-file "lsof.8" (string-append out "/share/man/man8/lsof.8"))
  63. ))
  64. %standard-phases)))))
  65. (synopsis "lsof displays information about open files")
  66. (description
  67. "Lsof stands for LiSt Open Files, and it does just that.
  68. It lists information about files that are open by the processes running
  69. on the system.")
  70. (license (license:fsf-free
  71. "file://00FAQ"
  72. "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
  73. (home-page "http://people.freebsd.org/~abe/")))