Hello,

Ludovic Courtès writes:

>> I wasn't sure whether I should put it in another file (it's a tiny
>> package).
>
> Similar tools (like ‘dfc’) ended up into admin.scm, though it’s not
> perfectly right.  I think we need a module for “this kind of tool,” but
> I’m not sure what to call it.  Ideas?

I see. Hmm, perhaps utilities.scm? though that sounds pretty generic -
it might end up being a "misc bucket". WDYT?

I've attached an updated patch, with tree added to admin.scm for now
(and made some minor stylistic changes, added comment).

Thanks for the quick review!

Alex

>From 4d7c8f1c1f92ad798cb156dfb8ad141a169abe4d Mon Sep 17 00:00:00 2001
From: Alex Sassmannshausen <alex.sassmannshau...@gmail.com>
Date: Wed, 4 Mar 2015 20:34:44 +0100
Subject: [PATCH] gnu: Add tree.

* gnu/packages/admin.scm (tree): New variable.
---
 gnu/packages/admin.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 72d8022..c85204f 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <m...@netris.org>
 ;;; Copyright © 2014 Eric Bavier <bav...@member.fsf.org>
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayi...@gmail.com>
+;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshau...@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -968,6 +969,31 @@ characters can be replaced as well, as can UTF-8 characters.")
 recover lost partitions and/or make non-booting disks bootable again.")
     (license license:gpl2+)))
 
+(define-public tree
+  (package
+    (name "tree")
+    (version "1.7.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "http://mama.indstate.edu/users/ice/tree/src/tree-";
+                    version ".tgz"))
+              (sha256
+               (base32 "04kviw799qxly08zb8n5mgxfd96gyis6x69q2qiw86jnh87c4mv9"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-delete 'configure %standard-phases)
+       #:tests? #f                      ; no check target
+       #:make-flags (let ((out (assoc-ref %outputs "out")))
+                               (list (string-append "prefix=" out)))))
+    (synopsis "Recursively list the contents of a directory")
+    (description
+     "Tree is a recursive directory listing command that produces a depth
+indented listing of files, which is colorized ala dircolors if the LS_COLORS
+environment variable is set and output is to tty.")
+    (home-page "http://mama.indstate.edu/users/ice/tree/";)
+    (license license:gpl2+)))
+
 (define-public direvent
   (package
     (name "direvent")
-- 
2.1.4

Reply via email to