guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: Add sedsed.


From: Kei Kebreau
Subject: 01/01: gnu: Add sedsed.
Date: Fri, 10 Feb 2017 21:29:06 -0500 (EST)

kkebreau pushed a commit to branch master
in repository guix.

commit a054777e0279125a4b86392d57608ec6789077fa
Author: ng0 <address@hidden>
Date:   Tue Jan 31 18:39:53 2017 +0000

    gnu: Add sedsed.
    
    * gnu/packages/admin.scm (sedsed): New variable.
    
    Signed-off-by: Kei Kebreau <address@hidden>
---
 gnu/packages/admin.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index e021e6b..5dc1fff 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -12,7 +12,7 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Peter Feigl <address@hidden>
 ;;; Copyright © 2016 John J. Foerch <address@hidden>
-;;; Coypright © 2016 ng0 <address@hidden>
+;;; Coypright © 2016, 2017 ng0 <address@hidden>
 ;;; Coypright © 2016 Tobias Geerinckx-Rice <address@hidden>
 ;;; Coypright © 2016 John Darrington <address@hidden>
 ;;;
@@ -1916,3 +1916,65 @@ in order to be able to find it.
 @item @command{sunxi-nand-image-builder}: Prepares raw NAND images.
 @end enumerate")
     (license license:gpl2+)))
+
+(define-public sedsed
+  (package
+    (name "sedsed")
+    (version "1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/aureliojargas/sedsed/";
+                           "archive/v" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0139jkqvm8ipiwfj7k69ry2f9b1ffgpk79arpz4r7w9kf6h23bnh"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f ; No tests.
+       #:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-sed-in
+           (lambda _
+             (substitute* "sedsed.py"
+               (("sedbin = 'sed'")
+                (string-append "sedbin = '" (which "sed") "'")))
+             #t))
+         (delete 'build)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               ;; Just one file to copy around
+               (install-file "sedsed.py" bin)
+               #t)))
+         (add-after 'install 'symlink
+           ;; Create 'sedsed' symlink to "sedsed.py".
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (sed (string-append bin "/sedsed"))
+                    (sedpy (string-append bin "/sedsed.py")))
+               (symlink  sedpy sed)
+               #t))))))
+    (home-page "http://aurelio.net/projects/sedsed";)
+    (synopsis "Sed sed scripts")
+    (description
+     "@code{sedsed} can debug, indent, tokenize and HTMLize your sed(1) script.
+
+In debug mode it reads your script and add extra commands to it.  When
+executed you can see the data flow between the commands, revealing all the
+magic sed does on its internal buffers.
+
+In indent mode your script is reformatted with standard spacing.
+
+In tokenize mode you can see the elements of every command you use.
+
+In HTMLize mode your script is converted to a beautiful colored HTML file,
+with all the commands and parameters identified for your viewing pleasure.
+
+With sedsed you can master any sed script.  No more secrets, no more hidden
+buffers.")
+    (license license:expat)))



reply via email to

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