download: Don't report the progress too fast.
[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>
54899414
MJ
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages shellutils)
92c2f605 23 #:use-module (gnu packages base)
76f31f0b 24 #:use-module (gnu packages golang)
92c2f605 25 #:use-module (gnu packages python)
54899414
MJ
26 #:use-module (guix licenses)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix utils)
92c2f605
AG
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system python))
54899414
MJ
32
33(define-public envstore
34 (package
35 (name "envstore")
36 (version "2.1")
37 (source
38 (origin
39 (method url-fetch)
40 (uri (string-append "https://finalrewind.org/projects/"
41 name "/" name "-" version ".tar.bz2"))
42 (sha256
43 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
44 (build-system gnu-build-system)
45 (arguments
46 `(#:test-target "test"
47 #:make-flags (list "CC=gcc"
48 (string-append "PREFIX=" (assoc-ref %outputs "out")))
49 #:phases
50 (modify-phases %standard-phases
51 (delete 'configure))))
52 (home-page "https://finalrewind.org/projects/envstore/")
53 (synopsis "Save and restore environment variables")
54 (description "Envstore is a program for sharing environment variables
55between various shells or commands.")
56 (license
57 (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
92c2f605
AG
58
59(define-public trash-cli
60 (package
61 (name "trash-cli")
33884385 62 (version "0.17.1.14")
92c2f605
AG
63 (source
64 (origin
65 (method url-fetch)
66 (uri (pypi-uri "trash-cli" version))
67 (sha256
68 (base32
33884385 69 "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
92c2f605
AG
70 (build-system python-build-system)
71 (arguments
72 `(#:python ,python-2
73 #:tests? #f ; no tests
74 #:phases
75 (modify-phases %standard-phases
76 (add-before 'build 'patch-path-constants
77 (lambda* (#:key inputs #:allow-other-keys)
78 (let ((libc (assoc-ref inputs "libc"))
79 (coreutils (assoc-ref inputs "coreutils")))
80 (substitute* "trashcli/list_mount_points.py"
81 (("\"/lib/libc.so.6\".*")
82 (string-append "\"" libc "/lib/libc.so.6\"\n"))
83 (("\"df\"")
84 (string-append "\"" coreutils "/bin/df\"")))))))))
85 (inputs `(("coreutils" ,coreutils)))
86 (home-page "https://github.com/andreafrancia/trash-cli")
87 (synopsis "Trash can management tool")
88 (description
89 "trash-cli is a command line utility for interacting with the
90FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
91environments. It can move files to the trash, and remove or list files that
92are already there.")
93 (license gpl2+)))
76f31f0b
CB
94
95(define-public direnv
96 (package
97 (name "direnv")
283234a3 98 (version "2.11.3")
76f31f0b
CB
99 (source
100 (origin (method url-fetch)
101 (uri (string-append "https://github.com/direnv/" name
102 "/archive/v" version ".tar.gz"))
103 (file-name (string-append name "-" version ".tar.gz"))
104 (sha256
105 (base32
283234a3 106 "01mhwzq9ss2qlnn8aahvwsgnspq8hbz0qfknf290aicngwx10d1d"))))
76f31f0b
CB
107 (build-system gnu-build-system)
108 (arguments
109 '(#:test-target "test"
110 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
111 #:phases (modify-phases %standard-phases (delete 'configure))))
112 (native-inputs
113 `(("go" ,go)
114 ("which" ,which)))
115 (home-page "http://direnv.net/")
116 (synopsis "Environment switcher for the shell")
117 (description "direnv can hook into bash, zsh, tcsh and fish shell to load
118or unload environment variables depending on the current directory. This
119allows project-specific environment variables without using the ~/.profile
120file.
121
122Before each prompt, direnv checks for the existence of a .envrc file in the
123current and parent directories. This file is then used to alter the
124environmental variables of the current shell.")
125 (license expat)))
f3f82d1d
SR
126
127(define-public fzy
128 (package
129 (name "fzy")
130 (version "0.9")
131 (source
132 (origin
133 (method url-fetch)
134 (uri (string-append "https://github.com/jhawthorn/fzy/archive/"
135 version ".tar.gz"))
136 (file-name (string-append name "-" version ".tar.gz"))
137 (sha256
138 (base32
139 "1xfgxqbkcpi2n4381kj3fq4026qs6by7xhl5gn0fgp3dh232c63j"))))
140 (build-system gnu-build-system)
141 (arguments
142 '(#:make-flags (list "CC=gcc"
143 (string-append "PREFIX=" (assoc-ref %outputs "out")))
144 #:phases
145 (modify-phases %standard-phases
146 (delete 'configure))))
147 (home-page "https://github.com/jhawthorn/fzy")
148 (synopsis "Fast fuzzy text selector for the terminal with an advanced
149scoring algorithm")
150 (description
151 "Most other fuzzy matchers sort based on the length of a match. fzy tries
152to find the result the user intended. It does this by favouring matches on
153consecutive letters and starts of words. This allows matching using acronyms
154or different parts of the path.
155
156fzy is designed to be used both as an editor plugin and on the command
157line. Rather than clearing the screen, fzy displays its interface directly
158below the current cursor position, scrolling the screen if necessary.")
159 (license expat)))