summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-02-12 10:46:09 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-02-15 20:45:45 +0300
commit5b2382929959db9d883982329ec8fdf4103a9351 (patch)
tree7d173cb4621e8855a50e3ad25eaf360f8fdd3ea4 /gnu
parenta124e4258ad911e1a65edb6c7d7d8f095249db5f (diff)
downloadguix-5b2382929959db9d883982329ec8fdf4103a9351.tar.gz
gnu: Add epipe.
* gnu/packages/emacs.scm (epipe): New public variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/emacs.scm50
1 files changed, 50 insertions, 0 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index 4829941ebf..0d25ea2b2c 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -7096,3 +7096,53 @@ notably useful when working on code in some language; you may grab code into a
 scratch buffer, and, by virtue of this extension, do so using the Emacs
 formatting rules for that language.")
       (license license:bsd-2))))
+
+(define-public epipe
+  (package
+    (name "epipe")
+    (version "0.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/cute-jumper/epipe/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "05a036852g4j63k1mhvyfrcsgkl9lczayi7x61570ysw3cli5wp5"))))
+    (build-system trivial-build-system)
+    (inputs
+     `(("bash" ,bash)
+       ("perl" ,perl)))
+    (native-inputs
+     `(("tar" ,tar)
+       ("gzip" ,gzip)))
+    (arguments
+     `(#:modules
+       ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         ;; Extract source
+         (setenv "PATH" (string-append
+                         (assoc-ref %build-inputs "tar") "/bin" ":"
+                         (assoc-ref %build-inputs "gzip") "/bin"))
+         (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
+         (chdir (string-append ,name "-" ,version))
+         ;; Patch shebangs
+         (substitute* "epipe"
+           (("/usr/bin/env bash")
+            (string-append (assoc-ref %build-inputs "bash") "/bin/bash")))
+         (patch-shebang "epipe.pl"
+                        (list (string-append (assoc-ref %build-inputs "perl")
+                                             "/bin")))
+         ;; Installation
+         (for-each (lambda (file)
+                     (install-file file (string-append %output "/bin")))
+                   '("epipe" "epipe.pl"))
+         #t)))
+    (home-page "https://github.com/cute-jumper/epipe")
+    (synopsis "Pipe to the @code{emacsclient}")
+    (description "@code{epipe} provides an utility to use your editor in
+the pipeline, featuring the support for running @code{emacsclient}.")
+    (license license:gpl3+)))