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 gexp)
#:use-module (radix packages golang)
#:use-module ((guix licenses) #:prefix license:))
#:use-module ((guix licenses) #:prefix license:)
#:replace (lf))
(define-public lf
(package
(name "lf")
(version "31")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/gokcehan/lf")
(commit (string-append "r" version))))
(file-name (git-file-name name version))
(sha256
(base32
"03icsf4c3j7295s1d8s6srz5gf09a3lghgw3zfcd86p03zhkzsaf"))))
(build-system go-build-system)
(arguments
(list #:go go-1.18
#:import-path "github.com/gokcehan/lf"))
(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 "https://github.com/gokcehan/lf")
(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)))
lf
(let* ((import-path "github.com/gokcehan/lf")
(lf-url (string-append "https://" import-path)))
(package
(name "lf")
(version "31")
(source
(origin
(method git-fetch)
(uri (git-reference
(url lf-url)
(commit (string-append "r" version))))
(file-name (git-file-name name version))
(sha256
(base32 "03icsf4c3j7295s1d8s6srz5gf09a3lghgw3zfcd86p03zhkzsaf"))))
(build-system go-build-system)
(arguments
(list #:go go-1.18
#:import-path import-path
#:phases
#~(let ((src (string-append "src/" #$import-path))
(man1 (string-append #$output "/share/man/man1"))
(applications (string-append #$output "/share/applications")))
(modify-phases %standard-phases
(add-after 'unpack 'install-man-page
(lambda _
(install-file (string-append src "/lf.1")
man1)))
(add-after 'unpack 'install-desktop-entry
(lambda _
(install-file (string-append src "/lf.desktop")
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))))