Last active
August 10, 2019 21:03
-
-
Save ivangrozni/734c74e4f3836044f857d8f864ff4bf1 to your computer and use it in GitHub Desktop.
dasht guix package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (dasht dasht) | |
#:use-module (guix packages) | |
#:use-module (guix build-system gnu) | |
#:use-module (guix licenses) | |
#:use-module (guix git-download) | |
;; Should I list all dependencies here as well? yes. | |
#:use-module (gnu packages sqlite) | |
#:use-module (gnu packages wget) | |
#:use-module (gnu packages w3m) | |
#:use-module (gnu packages networking)) | |
(define-public dasht | |
(package | |
(name "dasht") | |
(version "v2.3.0") | |
(source | |
(origin (method git-fetch) | |
(uri (git-reference | |
(url "https://github.com/sunaku/dasht") | |
(commit "v2.3.0"))) | |
(file-name (git-file-name name "v2.3.0")) | |
;; how to determine sha256sum from code - which branch/commit? | |
;; git checkout v2.3.0 && guix hash -rx . | |
(sha256 (base32 "0d0pcjalba58nvxdgn39m4b6n9ifajf3ygyjaqgvzwxzgpzw0a60")))) | |
(build-system gnu-build-system) | |
(arguments | |
`(#:phases | |
(modify-phases | |
%standard-phases | |
(delete 'configure) | |
(replace 'install | |
(lambda* | |
(#:key outputs #:allow-other-keys) | |
(let* ((out (assoc-ref outputs "out")) | |
(bin (string-append out "/bin"))) | |
(for-each | |
(lambda (file) | |
(install-file file bin) | |
(wrap-program | |
(string-append bin "/" (basename file)) `("PATH" ":" prefix (,(getenv "PATH")))) | |
) | |
(find-files "./bin" "dasht.*") | |
) | |
(mkdir-p (string-append out "share/man/man1")) | |
(copy-recursively "./man/man1" (string-append out "/share/man/man1/")) | |
) ;; not sure if out should be here or only path to bin folder | |
;; copy man to man | |
;; check if zsh exists and copy etc there as well | |
) | |
) | |
(delete 'build) | |
) | |
) | |
) | |
(synopsis "Search API docs offline, in terminal or browser") | |
(description | |
"dasht is a collection of shell scripts for searching, browsing, and managing API documentation (in the form of 150+ offline documentation sets, courtesy of Dash for OS X) all from the comfort of your own terminal! | |
The name \"dasht\" is a portmanteau of Dash and the letter \"t\", for terminal. Etymologically, \"dasht\" is Persian for plain, as in an flat expanse of land, which aptly characterizes the terminal environment where everything is text.") | |
(home-page "https://github.com/sunaku/dasht") | |
(license isc) | |
(propagated-inputs | |
`(("w3m" ,w3m) | |
("sqlite" ,sqlite) | |
("wget" ,wget) | |
("socat" ,socat) | |
)))) | |
dasht |
rekado
commented
Aug 10, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment