2020-08-10 01:13:33 +00:00
|
|
|
;;; Copyright © 2020 Collin J. Doering <collin@rekahsoft.ca>
|
2019-06-16 00:12:23 +00:00
|
|
|
;;;
|
2020-08-10 01:13:33 +00:00
|
|
|
;;; This file is part of the GNU Guix channel rekahsoft-guix
|
2019-06-16 00:12:23 +00:00
|
|
|
;;;
|
2020-08-10 01:13:33 +00:00
|
|
|
;;; 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.
|
2019-06-16 00:12:23 +00:00
|
|
|
;;;
|
2020-08-10 01:13:33 +00:00
|
|
|
;;; 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
|
2019-06-16 00:12:23 +00:00
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
2020-08-10 01:13:33 +00:00
|
|
|
;;; 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/>.
|
2019-06-16 00:12:23 +00:00
|
|
|
|
2020-09-08 21:05:21 +00:00
|
|
|
(define-module (rekahsoft-gnu packages shellutils)
|
2019-06-16 00:12:23 +00:00
|
|
|
#: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)
|
2020-12-27 20:24:12 +00:00
|
|
|
#:use-module (gnu packages perl)
|
2019-06-16 00:12:23 +00:00
|
|
|
#:use-module (gnu packages python)
|
|
|
|
#:use-module (gnu packages readline)
|
|
|
|
#:use-module (gnu packages ruby)
|
|
|
|
#:use-module (gnu packages shells)
|
2020-09-08 21:05:21 +00:00
|
|
|
#:use-module (gnu packages tmux)
|
|
|
|
#:use-module (rekahsoft-gnu packages golang))
|
2019-06-16 00:12:23 +00:00
|
|
|
|
|
|
|
(define-public fzf
|
|
|
|
(package
|
|
|
|
(name "fzf")
|
2020-12-27 04:21:36 +00:00
|
|
|
(version "0.24.4")
|
2019-06-16 00:12:23 +00:00
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
2020-12-27 04:21:36 +00:00
|
|
|
(url "https://github.com/junegunn/fzf")
|
2019-06-16 00:12:23 +00:00
|
|
|
(commit version)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2020-12-27 04:21:36 +00:00
|
|
|
"17k32wr70sp7ag69xww2q9mrgnzakgkjw6la04n3jlhfa5z37dzj"))))
|
2019-06-16 00:12:23 +00:00
|
|
|
(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)
|
2020-04-20 19:06:54 +00:00
|
|
|
("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
|
2020-12-27 04:21:36 +00:00
|
|
|
("go-golang-org-x-sys" ,go-golang-org-x-sys)
|
|
|
|
("go-github-com-saracen-walker" ,go-github-com-saracen-walker)
|
|
|
|
("go-golang.org-x-sync-errgroup" ,go-golang.org-x-sync-errgroup)))
|
2019-06-16 00:12:23 +00:00
|
|
|
(propagated-inputs
|
2020-12-27 20:24:12 +00:00
|
|
|
`(("tmux" ,tmux)
|
|
|
|
("perl" ,perl)))
|
2019-06-16 00:12:23 +00:00
|
|
|
(arguments
|
2020-12-27 04:21:36 +00:00
|
|
|
`(#:import-path "github.com/junegunn/fzf"
|
2019-06-16 00:12:23 +00:00
|
|
|
#:install-source? #f
|
|
|
|
#:phases
|
|
|
|
(modify-phases %standard-phases
|
2020-12-27 04:21:36 +00:00
|
|
|
(add-before 'build 'setup-env
|
|
|
|
(lambda _
|
|
|
|
(setenv "FZF_VERSION" ,version)
|
|
|
|
(setenv "FZF_REVISION" ,version)))
|
2019-06-16 00:12:23 +00:00
|
|
|
(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)))
|
|
|
|
|
2019-06-16 00:14:04 +00:00
|
|
|
(define-public spaceship-prompt
|
|
|
|
(package
|
|
|
|
(name "spaceship-prompt")
|
2020-12-27 04:22:01 +00:00
|
|
|
(version "3.11.2")
|
2019-06-16 00:14:04 +00:00
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
2020-12-27 04:22:01 +00:00
|
|
|
(url "https://github.com/denysdovhan/spaceship-prompt")
|
2019-06-16 00:14:04 +00:00
|
|
|
(commit (string-append "v" version))))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2020-12-27 04:22:01 +00:00
|
|
|
"1q7m9mmg82n4fddfz01y95d5n34xnzhrnn1lli0vih39sgmzim9b"))))
|
2019-06-16 00:14:04 +00:00
|
|
|
(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)))
|
2020-12-30 23:31:20 +00:00
|
|
|
|
|
|
|
(define-public zsh-syntax-highlighting
|
|
|
|
(package
|
|
|
|
(name "zsh-syntax-highlighting")
|
|
|
|
(version "0.7.1")
|
|
|
|
(source (origin
|
|
|
|
(method git-fetch)
|
|
|
|
(uri (git-reference
|
|
|
|
(url "https://github.com/zsh-users/zsh-syntax-highlighting")
|
|
|
|
(commit version)))
|
|
|
|
(file-name (git-file-name name version))
|
|
|
|
(sha256
|
|
|
|
(base32
|
|
|
|
"039g3n59drk818ylcyvkciv8k9mf739cv6v4vis1h9fv9whbcmwl"))))
|
|
|
|
(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")))
|
|
|
|
(setenv "PREFIX" out)
|
|
|
|
;; TODO: These 2 lines are required otherwise the build
|
|
|
|
;; fails. This is due to the checkout is being modified, which
|
|
|
|
;; is somehow an issue (but is unexpected
|
|
|
|
(invoke "touch" "docs/all.md")
|
|
|
|
(chmod "README.md" #o700)
|
|
|
|
|
|
|
|
(invoke "make" "install")))))))
|
|
|
|
(synopsis "Fish shell-like syntax highlighting for Zsh")
|
|
|
|
(description
|
|
|
|
"This package provides syntax highlighting for the shell zsh. It enables
|
|
|
|
highlighting of commands whilst they are typed at a zsh prompt into an
|
|
|
|
interactive terminal. This helps in reviewing commands before running them,
|
|
|
|
particularly in catching syntax errors.")
|
|
|
|
(home-page "https://github.com/zsh-users/zsh-syntax-highlighting")
|
|
|
|
(license license:bsd-3)))
|