projects/guix·blob version-0.15.0 · refs

160 lines · 6.1 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Matthew Jordan <[email protected]>
3;;; Copyright © 2016, 2017 Alex Griffin <[email protected]>
4;;; Copyright © 2016 Christopher Baines <[email protected]>
5;;; Copyright © 2017 Stefan Reichör <[email protected]>
6;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
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)
24 #:use-module (gnu packages base)
25 #:use-module (gnu packages golang)
26 #:use-module (gnu packages python)
27 #:use-module (guix licenses)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix utils)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system python))
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
56between various shells or commands.")
57 (license
58 (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
59
60(define-public trash-cli
61 (package
62 (name "trash-cli")
63 (version "0.17.1.14")
64 (source
65 (origin
66 (method url-fetch)
67 (uri (pypi-uri "trash-cli" version))
68 (sha256
69 (base32
70 "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
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
91FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
92environments. It can move files to the trash, and remove or list files that
93are already there.")
94 (license gpl2+)))
95
96(define-public direnv
97 (package
98 (name "direnv")
99 (version "2.11.3")
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
107 "01mhwzq9ss2qlnn8aahvwsgnspq8hbz0qfknf290aicngwx10d1d"))))
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)))
116 (home-page "https://direnv.net/")
117 (synopsis "Environment switcher for the shell")
118 (description
119 "direnv can hook into the bash, zsh, tcsh, and fish shells to load
120or unload environment variables depending on the current directory. This
121allows project-specific environment variables without using @file{~/.profile}.
122
123Before each prompt, direnv checks for the existence of a @file{.envrc} file in
124the current and parent directories. This file is then used to alter the
125environment variables of the current shell.")
126 (license expat)))
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
150scoring algorithm")
151 (description
152 "Most other fuzzy matchers sort based on the length of a match. fzy tries
153to find the result the user intended. It does this by favouring matches on
154consecutive letters and starts of words. This allows matching using acronyms
155or different parts of the path.
156
157fzy is designed to be used both as an editor plugin and on the command
158line. Rather than clearing the screen, fzy displays its interface directly
159below the current cursor position, scrolling the screen if necessary.")
160 (license expat)))