1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
3 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
4 ;;; Copyright © 2016 Christopher Baines <mail@cbaines.net>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages shellutils)
22 #:use-module (gnu packages base)
23 #:use-module (gnu packages golang)
24 #:use-module (gnu packages python)
25 #:use-module (guix licenses)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python))
32 (define-public envstore
39 (uri (string-append "https://finalrewind.org/projects/"
40 name "/" name "-" version ".tar.bz2"))
42 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
43 (build-system gnu-build-system)
45 `(#:test-target "test"
46 #:make-flags (list "CC=gcc"
47 (string-append "PREFIX=" (assoc-ref %outputs "out")))
49 (modify-phases %standard-phases
50 (delete 'configure))))
51 (home-page "https://finalrewind.org/projects/envstore/")
52 (synopsis "Save and restore environment variables")
53 (description "Envstore is a program for sharing environment variables
54 between various shells or commands.")
56 (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
58 (define-public trash-cli
65 (uri (pypi-uri "trash-cli" version))
68 "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
69 (build-system python-build-system)
72 #:tests? #f ; no tests
74 (modify-phases %standard-phases
75 (add-before 'build 'patch-path-constants
76 (lambda* (#:key inputs #:allow-other-keys)
77 (let ((libc (assoc-ref inputs "libc"))
78 (coreutils (assoc-ref inputs "coreutils")))
79 (substitute* "trashcli/list_mount_points.py"
80 (("\"/lib/libc.so.6\".*")
81 (string-append "\"" libc "/lib/libc.so.6\"\n"))
83 (string-append "\"" coreutils "/bin/df\"")))))))))
84 (inputs `(("coreutils" ,coreutils)))
85 (home-page "https://github.com/andreafrancia/trash-cli")
86 (synopsis "Trash can management tool")
88 "trash-cli is a command line utility for interacting with the
89 FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
90 environments. It can move files to the trash, and remove or list files that
99 (origin (method url-fetch)
100 (uri (string-append "https://github.com/direnv/" name
101 "/archive/v" version ".tar.gz"))
102 (file-name (string-append name "-" version ".tar.gz"))
105 "1h5ywn0glw1kmxs3jwjv9fvnhha942c6k740p5ghvyns05ds9cqf"))))
106 (build-system gnu-build-system)
108 '(#:test-target "test"
109 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
110 #:phases (modify-phases %standard-phases (delete 'configure))))
114 (home-page "http://direnv.net/")
115 (synopsis "Environment switcher for the shell")
116 (description "direnv can hook into bash, zsh, tcsh and fish shell to load
117 or unload environment variables depending on the current directory. This
118 allows project-specific environment variables without using the ~/.profile
121 Before each prompt, direnv checks for the existence of a .envrc file in the
122 current and parent directories. This file is then used to alter the
123 environmental variables of the current shell.")