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