From mboxrd@z Thu Jan 1 00:00:00 1970 From: contact.ng0@cryptolab.net Subject: [PATCH] gnu: Add sedsed. Date: Tue, 31 Jan 2017 18:03:33 +0000 Message-ID: <20170131180333.6675-2-contact.ng0@cryptolab.net> References: <20170131180333.6675-1-contact.ng0@cryptolab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYcl4-0003kN-K6 for guix-devel@gnu.org; Tue, 31 Jan 2017 13:02:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYcl0-0000x4-NT for guix-devel@gnu.org; Tue, 31 Jan 2017 13:02:22 -0500 Received: from aibo.runbox.com ([91.220.196.211]:49042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYcl0-0000wy-GY for guix-devel@gnu.org; Tue, 31 Jan 2017 13:02:18 -0500 In-Reply-To: <20170131180333.6675-1-contact.ng0@cryptolab.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org From: ng0 * gnu/packages/admin.scm (sedsed): New variable. --- gnu/packages/admin.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 96aececbb..bb69a9df1 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Peter Feigl ;;; Copyright © 2016 John J. Foerch -;;; Coypright © 2016 ng0 +;;; Coypright © 2016, 2017 ng0 ;;; Coypright © 2016 Tobias Geerinckx-Rice ;;; Coypright © 2016 John Darrington ;;; @@ -1926,3 +1926,66 @@ 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 _ + ;; Just one file to copy around + (install-file "sedsed.py" (string-append + (assoc-ref %outputs "out") + "/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) scripts. + +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.") + ;; Unspecified version of GPL. + (license license:gpl3))) -- 2.11.0