gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / shellutils.scm
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>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
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.
12 ;;;
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.
17 ;;;
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/>.
20
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))
31
32 (define-public envstore
33 (package
34 (name "envstore")
35 (version "2.1")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "https://finalrewind.org/projects/"
40 name "/" name "-" version ".tar.bz2"))
41 (sha256
42 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
43 (build-system gnu-build-system)
44 (arguments
45 `(#:test-target "test"
46 #:make-flags (list "CC=gcc"
47 (string-append "PREFIX=" (assoc-ref %outputs "out")))
48 #:phases
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.")
55 (license
56 (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
57
58 (define-public trash-cli
59 (package
60 (name "trash-cli")
61 (version "0.17.1.14")
62 (source
63 (origin
64 (method url-fetch)
65 (uri (pypi-uri "trash-cli" version))
66 (sha256
67 (base32
68 "01q0cl04ljf214z6s3g256gsxx3pqsgaf6ac1zh0vrq5bnhnr85h"))))
69 (build-system python-build-system)
70 (arguments
71 `(#:python ,python-2
72 #:tests? #f ; no tests
73 #:phases
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"))
82 (("\"df\"")
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")
87 (description
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
91 are already there.")
92 (license gpl2+)))
93
94 (define-public direnv
95 (package
96 (name "direnv")
97 (version "2.10.0")
98 (source
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"))
103 (sha256
104 (base32
105 "1h5ywn0glw1kmxs3jwjv9fvnhha942c6k740p5ghvyns05ds9cqf"))))
106 (build-system gnu-build-system)
107 (arguments
108 '(#:test-target "test"
109 #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
110 #:phases (modify-phases %standard-phases (delete 'configure))))
111 (native-inputs
112 `(("go" ,go)
113 ("which" ,which)))
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
119 file.
120
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.")
124 (license expat)))