gnu: igt-gpu-tools: Don't use NAME in source URI.
[jackhill/guix/guix.git] / gnu / packages / shellutils.scm
CommitLineData
54899414
MJ
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
8efd807f 3;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
76f31f0b 4;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
f3f82d1d 5;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
a6317919 6;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
f80d6ea2 7;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
54899414
MJ
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages shellutils)
92c2f605 25 #:use-module (gnu packages base)
76f31f0b 26 #:use-module (gnu packages golang)
92c2f605 27 #:use-module (gnu packages python)
54899414
MJ
28 #:use-module (guix licenses)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31b61956 31 #:use-module (guix git-download)
f80d6ea2
BS
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages ncurses)
34 #:use-module (gnu packages readline)
35 #:use-module (gnu packages pkg-config)
54899414 36 #:use-module (guix utils)
92c2f605 37 #:use-module (guix build-system gnu)
39ea311c 38 #:use-module (guix build-system go)
92c2f605 39 #:use-module (guix build-system python))
54899414
MJ
40
41(define-public envstore
42 (package
43 (name "envstore")
44 (version "2.1")
45 (source
46 (origin
47 (method url-fetch)
48 (uri (string-append "https://finalrewind.org/projects/"
49 name "/" name "-" version ".tar.bz2"))
50 (sha256
51 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
52 (build-system gnu-build-system)
53 (arguments
54 `(#:test-target "test"
55 #:make-flags (list "CC=gcc"
56 (string-append "PREFIX=" (assoc-ref %outputs "out")))
57 #:phases
58 (modify-phases %standard-phases
59 (delete 'configure))))
60 (home-page "https://finalrewind.org/projects/envstore/")
61 (synopsis "Save and restore environment variables")
62 (description "Envstore is a program for sharing environment variables
63between various shells or commands.")
64 (license
65 (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
92c2f605
AG
66
67(define-public trash-cli
68 (package
69 (name "trash-cli")
33884385 70 (version "0.17.1.14")
92c2f605
AG
71 (source
72 (origin
73 (method url-fetch)
74 (uri (pypi-uri "trash-cli" version))
75 (sha256
76 (base32
33884385 77 "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
92c2f605
AG
78 (build-system python-build-system)
79 (arguments
80 `(#:python ,python-2
81 #:tests? #f ; no tests
82 #:phases
83 (modify-phases %standard-phases
84 (add-before 'build 'patch-path-constants
85 (lambda* (#:key inputs #:allow-other-keys)
86 (let ((libc (assoc-ref inputs "libc"))
87 (coreutils (assoc-ref inputs "coreutils")))
88 (substitute* "trashcli/list_mount_points.py"
89 (("\"/lib/libc.so.6\".*")
90 (string-append "\"" libc "/lib/libc.so.6\"\n"))
91 (("\"df\"")
92 (string-append "\"" coreutils "/bin/df\"")))))))))
93 (inputs `(("coreutils" ,coreutils)))
94 (home-page "https://github.com/andreafrancia/trash-cli")
95 (synopsis "Trash can management tool")
96 (description
97 "trash-cli is a command line utility for interacting with the
98FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
99environments. It can move files to the trash, and remove or list files that
100are already there.")
101 (license gpl2+)))
76f31f0b
CB
102
103(define-public direnv
104 (package
105 (name "direnv")
39ea311c 106 (version "2.15.2")
76f31f0b
CB
107 (source
108 (origin (method url-fetch)
109 (uri (string-append "https://github.com/direnv/" name
110 "/archive/v" version ".tar.gz"))
111 (file-name (string-append name "-" version ".tar.gz"))
112 (sha256
113 (base32
39ea311c 114 "1hhmc6rb7b1d4s4kgb4blrq35h388ax37ap88dq3dgfcw9w6j1rm"))))
76f31f0b
CB
115 (build-system gnu-build-system)
116 (arguments
39ea311c 117 `(#:test-target "test"
76f31f0b 118 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
39ea311c
LF
119 #:modules ((guix build gnu-build-system)
120 ((guix build go-build-system) #:prefix go:)
121 (guix build utils))
122 #:imported-modules (,@%gnu-build-system-modules
123 (guix build go-build-system))
124 #:phases
125 (modify-phases %standard-phases
126 (delete 'configure)
127 ;; Help the build scripts find the Go language dependencies.
128 (add-after 'unpack 'setup-go-environment
129 (assoc-ref go:%standard-phases 'setup-environment)))))
978d5973 130 (inputs
39ea311c
LF
131 `(("go" ,go)
132 ("go-github-com-burntsushi-toml" ,go-github-com-burntsushi-toml)
133 ("go-github-com-direnv-go-dotenv" ,go-github-com-direnv-go-dotenv)))
76f31f0b 134 (native-inputs
978d5973 135 `(("which" ,which)))
6137da88 136 (home-page "https://direnv.net/")
76f31f0b 137 (synopsis "Environment switcher for the shell")
a6317919
TGR
138 (description
139 "direnv can hook into the bash, zsh, tcsh, and fish shells to load
76f31f0b 140or unload environment variables depending on the current directory. This
a6317919 141allows project-specific environment variables without using @file{~/.profile}.
76f31f0b 142
a6317919
TGR
143Before each prompt, direnv checks for the existence of a @file{.envrc} file in
144the current and parent directories. This file is then used to alter the
145environment variables of the current shell.")
76f31f0b 146 (license expat)))
f3f82d1d
SR
147
148(define-public fzy
149 (package
150 (name "fzy")
2792d8a8 151 (version "1.0")
f3f82d1d
SR
152 (source
153 (origin
31b61956
TGR
154 (method git-fetch)
155 (uri (git-reference
156 (url "https://github.com/jhawthorn/fzy.git")
157 (commit version)))
158 (file-name (git-file-name name version))
f3f82d1d
SR
159 (sha256
160 (base32
2792d8a8 161 "1gkzdvj73f71388jvym47075l9zw61v6l8wdv2lnc0mns6dxig0k"))))
f3f82d1d
SR
162 (build-system gnu-build-system)
163 (arguments
164 '(#:make-flags (list "CC=gcc"
165 (string-append "PREFIX=" (assoc-ref %outputs "out")))
166 #:phases
167 (modify-phases %standard-phases
168 (delete 'configure))))
169 (home-page "https://github.com/jhawthorn/fzy")
170 (synopsis "Fast fuzzy text selector for the terminal with an advanced
171scoring algorithm")
172 (description
173 "Most other fuzzy matchers sort based on the length of a match. fzy tries
174to find the result the user intended. It does this by favouring matches on
175consecutive letters and starts of words. This allows matching using acronyms
176or different parts of the path.
177
178fzy is designed to be used both as an editor plugin and on the command
179line. Rather than clearing the screen, fzy displays its interface directly
180below the current cursor position, scrolling the screen if necessary.")
181 (license expat)))
f80d6ea2
BS
182
183(define-public hstr
184 (package
185 (name "hstr")
186 (version "2.0")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append "https://github.com/dvorka/" name "/archive/"
190 version ".tar.gz"))
191 (sha256
192 (base32
193 "0yk2008bl48hv0v3c90ngq4y45h3nxif2ik6s3l7kag1zs5yv4wd"))
194 (file-name (string-append name "-" version ".tar.gz"))))
195 (build-system gnu-build-system)
196 (arguments
197 `(#:phases
198 (modify-phases %standard-phases
199 (add-before 'build 'adjust-ncurses-includes
200 (lambda* (#:key make-flags outputs #:allow-other-keys)
201 (let ((out (assoc-ref outputs "out")))
202 (substitute* "src/include/hstr_curses.h"
203 (("ncursesw\\/curses.h") "ncurses.h"))
204 (substitute* "src/include/hstr.h"
205 (("ncursesw\\/curses.h") "ncurses.h")))
206 #t)))))
207 (native-inputs
208 `(("autoconf" ,autoconf)
209 ("automake" ,automake)
210 ("pkg-config" ,pkg-config)))
211 (inputs
212 `(("ncurses" ,ncurses)
213 ("readline" ,readline)))
214 (synopsis "Navigate and search command history with shell history suggest box")
215 (description "HSTR (HiSToRy) is a command-line utility that brings
216improved Bash and Zsh command completion from the history. It aims to make
217completion easier and more efficient than with @kbd{Ctrl-R}. It allows you to
218easily view, navigate, and search your command history with suggestion boxes.
219HSTR can also manage your command history (for instance you can remove
220commands that are obsolete or contain a piece of sensitive information) or
221bookmark your favourite commands.")
222 (home-page "http://me.mindforger.com/projects/hh.html")
223 (license asl2.0)))