From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33299) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3Jhm-0002Ow-GI for guix-patches@gnu.org; Sat, 14 Oct 2017 06:30:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3Jhj-0007B0-Am for guix-patches@gnu.org; Sat, 14 Oct 2017 06:30:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58425) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3Jhj-0007Au-5b for guix-patches@gnu.org; Sat, 14 Oct 2017 06:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e3Jhi-0007bB-OT for guix-patches@gnu.org; Sat, 14 Oct 2017 06:30:02 -0400 Subject: [bug#28832] [PATCH 1/3] gnu: Add emacs-json-reformat. References: <87lgke3vlz.fsf@gmail.com> In-Reply-To: <87lgke3vlz.fsf@gmail.com> Resent-Message-ID: From: Oleg Pykhalov Date: Sat, 14 Oct 2017 13:29:13 +0300 Message-Id: <20171014102915.11778-1-go.wigust@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28832@debbugs.gnu.org * gnu/packages/emacs.scm (emacs-json-reformat): New variable. --- gnu/packages/emacs.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 66f0a2ebe..8d94341ab 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -5569,6 +5569,55 @@ pair of minor modes which suppress all mouse events by intercepting them and running a customisable handler command (@code{ignore} by default). ") (license license:gpl3+))) +(define-public emacs-json-reformat + (package + (name "emacs-json-reformat") + (version "0.0.6") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/gongo/json-reformat/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "11fbq4scrgr7m0iwnzcrn2g7xvqwm2gf82sa7zy1l0nil7265p28")))) + (build-system emacs-build-system) + (propagated-inputs `(("emacs-undercover" ,emacs-undercover))) + (inputs + `(("emacs-dash" ,emacs-dash) ; for tests + ("emacs-shut-up" ,emacs-shut-up))) ; for tests + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'install 'check + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "emacs" "--batch" "-L" "." + "-L" (string-append + (assoc-ref inputs "emacs-undercover") + "/share/emacs/site-lisp/guix.d/undercover-" + ,(package-version emacs-undercover)) + "-L" (string-append + (assoc-ref inputs "emacs-dash") + "/share/emacs/site-lisp/guix.d/dash-" + ,(package-version emacs-dash)) + "-L" (string-append + (assoc-ref inputs "emacs-shut-up") + "/share/emacs/site-lisp/guix.d/shut-up-" + ,(package-version emacs-shut-up)) + "-l" "test/test-helper.el" + "-l" "test/json-reformat-test.el" + "-f" "ert-run-tests-batch-and-exit")) + ;; Fails + ;; json-reformat-test:json-reformat-region-occur-error + ;; json-reformat-test:string-to-string + #t))))) + (home-page "https://github.com/gongo/json-reformat") + (synopsis "Reformatting tool for JSON") + (description "@code{json-reformat} provides a reformatting tool for +@url{http://json.org/, JSON}.") + (license license:gpl3+))) + (define-public emacs-restclient (let ((commit "07a3888bb36d0e29608142ebe743b4362b800f40") (revision "1")) ;Guix package revision, -- 2.14.2