rekahsoft-guix/rekahsoft-gnu/packages/shellutils.scm
Collin J. Doering 9bf768e70e
Rename gnu module to rekahsoft-gnu
Signed-off-by: Collin J. Doering <collin@rekahsoft.ca>
2020-09-08 23:50:17 -04:00

163 lines
6.8 KiB
Scheme

;;; Copyright © 2020 Collin J. Doering <collin@rekahsoft.ca>
;;;
;;; This file is part of the GNU Guix channel rekahsoft-guix
;;;
;;; The rekahsoft-guix channel for GNU Guix is free software; you can
;;; redistribute it and/or modify it under the terms of the GNU General Public
;;; License as published by the Free Software Foundation; either version 3 of
;;; the License, or (at your option) any later version.
;;;
;;; The rekahsoft-guix channel for GNU Guix is distributed in the hope that it
;;; will be useful, but WITHOUT ANY WARRANTY; without even the implied
;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License along
;;; with the rekahsoft-guix channel for GNU Guix. If not, see
;;; <http://www.gnu.org/licenses/>.
(define-module (rekahsoft-gnu packages shellutils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages golang)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
#:use-module (gnu packages ruby)
#:use-module (gnu packages shells)
#:use-module (gnu packages tmux)
#:use-module (rekahsoft-gnu packages golang))
(define-public fzf
(package
(name "fzf")
(version "0.18.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/junegunn/fzf.git")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
(build-system go-build-system)
(native-inputs
`(("github.com/mattn/go-isatty" ,go-github-com-mattn-go-isatty)
("github.com/mattn/go-runewidth" ,go-github-com-mattn-go-runewidth)
("github.com/mattn/go-shellwords" ,go-github-com-mattn-go-shellwords)
("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
("go-golang-org-x-sys" ,go-golang-org-x-sys)))
(propagated-inputs
`(("tmux" ,tmux)))
(arguments
'(#:import-path "github.com/junegunn/fzf"
#:install-source? #f
#:phases
(modify-phases %standard-phases
(replace 'build
(lambda _
(with-directory-excursion "src/github.com/junegunn/fzf"
(invoke "make"))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(mkdir-p (string-append out "/share"))
(with-directory-excursion "src/github.com/junegunn/fzf"
(invoke "make" "install")
(copy-recursively "bin" (string-append out "/bin"))
(copy-recursively "man" (string-append out "/share/man"))
(copy-recursively "shell" (string-append out "/share/fzf")))))))))
(synopsis "Command line fuzzy finder")
(description
"@command{fzf} is a general purpose command line fuzzy finder. It's an
interactive uniz filter for command-line that can be used with any lists;
files, command history, processes, hostnames, bookmarks, git commits, etc..")
(home-page "https://github.com/junegunn/fzf")
(license license:expat)))
(define-public sh-z
(package
(name "sh-z")
(version "1.11")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rupa/z.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; No tests provided
#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(man (string-append out "/share/man/man1"))
(bin (string-append out "/bin")))
(install-file "z.sh" bin)
(chmod (string-append bin "/z.sh") #o755)
(install-file "z.1" man)))))))
(synopsis "Jump about directories")
(description
"Tracks your most used directories, based on ``frecency''. After a short
learning phase, z will take you to the most ``frecent'' directory that matches
ALL of the regexes given on the command line in order.")
(home-page "https://github.com/rupa/z")
(license license:expat)))
(define-public spaceship-prompt
(package
(name "spaceship-prompt")
(version "3.11.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/denysdovhan/spaceship-prompt.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"171gmqnwbyan1wslbh4aky1gdqfbw3gfsfscxfnpgk0j114a6jfj"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(delete 'configure)
(delete 'build)
(delete 'check)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(func-path (string-append out "/share/zsh/site-functions"))
(install-path (string-append out "/lib/spaceship-prompt")))
(for-each mkdir-p `(,func-path ,install-path))
(for-each (lambda (dir)
(copy-recursively dir (string-append install-path "/" dir)))
'("lib" "modules" "sections"))
(copy-file "spaceship.zsh" (string-append install-path "/spaceship.zsh"))
(symlink (string-append install-path "/spaceship.zsh")
(string-append func-path "/prompt_spaceship_setup"))))))))
(synopsis "Zsh prompt for Astronauts")
(description
"Spaceship is a minimalistic, powerful and extremely customizable
Zsh prompt. It combines everything you may need for convenient work,
without unecessary complications, like a real spaceship.")
(home-page "https://github.com/denysdovhan/spaceship-prompt")
(license license:expat)))