packages: disk: Add a .desktop file and manpages for lf

pull/3/head
Luis Guilherme Coelho 2024-03-26 21:51:23 -03:00
parent 2775e40dec
commit f3dda04dca
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
1 changed files with 46 additions and 32 deletions

View File

@ -6,37 +6,51 @@
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (radix packages golang) #:use-module (radix packages golang)
#:use-module ((guix licenses) #:prefix license:)) #:use-module ((guix licenses) #:prefix license:)
#:replace (lf))
(define-public lf (define-public lf
(package (let* ((import-path "github.com/gokcehan/lf")
(name "lf") (lf-url (string-append "https://" import-path)))
(version "31") (package
(source (origin (name "lf")
(method git-fetch) (version "31")
(uri (git-reference (source
(url "https://github.com/gokcehan/lf") (origin
(commit (string-append "r" version)))) (method git-fetch)
(file-name (git-file-name name version)) (uri (git-reference
(sha256 (url lf-url)
(base32 (commit (string-append "r" version))))
"03icsf4c3j7295s1d8s6srz5gf09a3lghgw3zfcd86p03zhkzsaf")))) (file-name (git-file-name name version))
(build-system go-build-system) (sha256
(arguments (base32 "03icsf4c3j7295s1d8s6srz5gf09a3lghgw3zfcd86p03zhkzsaf"))))
(list #:go go-1.18 (build-system go-build-system)
#:import-path "github.com/gokcehan/lf")) (arguments
(inputs (list go-golang-org-x-term (list #:go go-1.18
go-golang-org-x-sys #:import-path import-path
go-github-com-mattn-go-runewidth #:phases
go-github-com-gdamore-tcell-v2 #~(let ((src (string-append "src/" #$import-path))
go-github-com-djherbis-times)) (man1 (string-append #$output "/share/man/man1"))
(home-page "https://github.com/gokcehan/lf") (applications (string-append #$output "/share/applications")))
(synopsis "Console file browser similar to Ranger") (modify-phases %standard-phases
(description (add-after 'unpack 'install-man-page
"lf (as in \"list files\") is a terminal file manager (lambda _
written in Go. It is heavily inspired by ranger with some missing and (install-file (string-append src "/lf.1")
extra features. Some of the missing features are deliberately omitted man1)))
since they are better handled by external tools.") (add-after 'unpack 'install-desktop-entry
(license license:expat))) (lambda _
(install-file (string-append src "/lf.desktop")
lf applications)))))))
(inputs (list go-golang-org-x-term
go-golang-org-x-sys
go-github-com-mattn-go-runewidth
go-github-com-gdamore-tcell-v2
go-github-com-djherbis-times))
(home-page lf-url)
(synopsis "Console file browser similar to Ranger")
(description "lf (as in \"list files\") is a terminal file manager
written in Go. It is heavily inspired by ranger with some missing and extra
features. Some of the missing features are deliberately omitted since they are
better handled by external tools.")
(license license:expat))))