| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages lsof)
|
| 20 | #:use-module ((guix licenses) #:prefix 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 |
|
| 26 | (define %ftp-base
|
| 27 | "ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/")
|
| 28 |
|
| 29 | (define-public lsof
|
| 30 | (package
|
| 31 | (name "lsof")
|
| 32 | (version "4.88")
|
| 33 | (source (origin
|
| 34 | (method url-fetch)
|
| 35 | (uri (list (string-append %ftp-base "lsof_"
|
| 36 | version ".tar.bz2")
|
| 37 | (string-append %ftp-base "OLD/lsof_"
|
| 38 | version ".tar.bz2")
|
| 39 |
|
| 40 | |
| 41 | |
| 42 | |
| 43 | (string-append
|
| 44 | "ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/lsof_"
|
| 45 | version ".tar.bz2")
|
| 46 | (string-append
|
| 47 | "ftp://sunsite.ualberta.ca/pub/Mirror/lsof/lsof_"
|
| 48 | version ".tar.bz2")))
|
| 49 | (sha256
|
| 50 | (base32
|
| 51 | "16y9wm26rg81mihnzcbdg8h8vhxmq8kn62ssxb8cqydp4q79nvzy"))))
|
| 52 | (build-system gnu-build-system)
|
| 53 | (inputs `(("perl" ,perl)))
|
| 54 | (arguments
|
| 55 | `(#:tests? #f |
| 56 | #:phases
|
| 57 | (alist-replace
|
| 58 | 'unpack
|
| 59 | (lambda* (#:key source #:allow-other-keys)
|
| 60 | (let ((unpack (assoc-ref %standard-phases 'unpack)))
|
| 61 | (unpack #:source source)
|
| 62 | (unpack #:source (car (find-files "." "\\.tar$")))))
|
| 63 | (alist-replace
|
| 64 | 'configure
|
| 65 | (lambda _
|
| 66 | (setenv "LSOF_CC" "gcc")
|
| 67 | (setenv "LSOF_MAKE" "make")
|
| 68 | (system* "./Configure" "linux"))
|
| 69 | (alist-replace
|
| 70 | 'install
|
| 71 | (lambda* (#:key outputs #:allow-other-keys)
|
| 72 | (let ((out (assoc-ref outputs "out")))
|
| 73 | (mkdir out)
|
| 74 | (mkdir (string-append out "/bin"))
|
| 75 | (copy-file "lsof" (string-append out "/bin/lsof"))
|
| 76 | (mkdir (string-append out "/share"))
|
| 77 | (mkdir (string-append out "/share/man"))
|
| 78 | (mkdir (string-append out "/share/man/man8"))
|
| 79 | (copy-file "lsof.8" (string-append out "/share/man/man8/lsof.8"))
|
| 80 | ))
|
| 81 | %standard-phases)))))
|
| 82 | (synopsis "Display information about open files")
|
| 83 | (description
|
| 84 | "Lsof stands for LiSt Open Files, and it does just that.
|
| 85 | It lists information about files that are open by the processes running
|
| 86 | on the system.")
|
| 87 | (license (license:fsf-free
|
| 88 | "file://00FAQ"
|
| 89 | "License inspired by zlib, see point 1.9 of 00FAQ in the distribution."))
|
| 90 | (home-page "http://people.freebsd.org/~abe/")))
|