guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add trash-cli.


From: Leo Famulari
Subject: 01/01: gnu: Add trash-cli.
Date: Sun, 24 Jul 2016 00:39:01 +0000 (UTC)

lfam pushed a commit to branch master
in repository guix.

commit 92c2f6055dc559f0c5a0efd895d261c4bf1ca197
Author: Alex Griffin <address@hidden>
Date:   Fri Jul 22 19:20:53 2016 -0500

    gnu: Add trash-cli.
    
    * gnu/packages/shellutils.scm (trash-cli): New variable.
    
    Signed-off-by: Leo Famulari <address@hidden>
---
 gnu/packages/shellutils.scm |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 8108b04..27f45ba 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Matthew Jordan <address@hidden>
+;;; Copyright © 2016 Alex Griffin <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,11 +18,14 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages shellutils)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages python)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python))
 
 (define-public envstore
   (package
@@ -48,3 +52,39 @@
 between various shells or commands.")
     (license
      (non-copyleft "http://www.wtfpl.net/txt/copying/";))))
+
+(define-public trash-cli
+  (package
+    (name "trash-cli")
+    (version "0.12.9.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "trash-cli" version))
+       (sha256
+        (base32
+         "1p4v2qx0sy47d9c9axszq04wns63s4b7rrhmsavg948sklqdaf54"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'patch-path-constants
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((libc (assoc-ref inputs "libc"))
+                   (coreutils (assoc-ref inputs "coreutils")))
+               (substitute* "trashcli/list_mount_points.py"
+                 (("\"/lib/libc.so.6\".*")
+                  (string-append "\"" libc "/lib/libc.so.6\"\n"))
+                 (("\"df\"")
+                  (string-append "\"" coreutils "/bin/df\"")))))))))
+    (inputs `(("coreutils" ,coreutils)))
+    (home-page "https://github.com/andreafrancia/trash-cli";)
+    (synopsis "Trash can management tool")
+    (description
+     "trash-cli is a command line utility for interacting with the
+FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
+environments.  It can move files to the trash, and remove or list files that
+are already there.")
+    (license gpl2+)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]