| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 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 |
| 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.11.3")
|
| 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 | "01mhwzq9ss2qlnn8aahvwsgnspq8hbz0qfknf290aicngwx10d1d"))))
|
| 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)))
|