all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add trash-cli.
@ 2016-07-23  0:29 Alex Griffin
  2016-07-24  0:39 ` Leo Famulari
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Griffin @ 2016-07-23  0:29 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 152 bytes --]

This patch adds trash-cli, a simple command line utility for interacting
with the FreeDesktop.org Trash used by GNOME, KDE, XFCE, etc.
-- 
Alex Griffin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-trash-cli.patch --]
[-- Type: text/x-patch; name="0001-gnu-Add-trash-cli.patch", Size: 2810 bytes --]

From 1aaeb3dc699d58d7ef18791b8c385e341e4acc15 Mon Sep 17 00:00:00 2001
From: Alex Griffin <a@ajgrf.com>
Date: Fri, 22 Jul 2016 19:20:53 -0500
Subject: [PATCH] gnu: Add trash-cli.

* gnu/packages/shellutils.scm (trash-cli): New variable.
---
 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 <matthewjordandevops@yandex.com>
+;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;;
 ;;; 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+)))
-- 
2.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: Add trash-cli.
  2016-07-23  0:29 [PATCH] gnu: Add trash-cli Alex Griffin
@ 2016-07-24  0:39 ` Leo Famulari
  0 siblings, 0 replies; 2+ messages in thread
From: Leo Famulari @ 2016-07-24  0:39 UTC (permalink / raw)
  To: Alex Griffin; +Cc: guix-devel

On Fri, Jul 22, 2016 at 07:29:12PM -0500, Alex Griffin wrote:
> This patch adds trash-cli, a simple command line utility for interacting
> with the FreeDesktop.org Trash used by GNOME, KDE, XFCE, etc.

> * gnu/packages/shellutils.scm (trash-cli): New variable.

Thanks! Pushed as 92c2f6055.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-24  0:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-23  0:29 [PATCH] gnu: Add trash-cli Alex Griffin
2016-07-24  0:39 ` Leo Famulari

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.