|
@@ -0,0 +1,74 @@
|
|
|
+;;; This file is part of guix-bavier.git
|
|
|
+;;; Copyright © 2021 Eric Bavier <bavier@posteo.net>
|
|
|
+;;; License: GPLv3+
|
|
|
+
|
|
|
+(define-module (bavier packages ed)
|
|
|
+ #:use-module (guix build-system gnu)
|
|
|
+ #:use-module (guix git-download)
|
|
|
+ #:use-module (guix packages)
|
|
|
+ #:use-module (gnu packages)
|
|
|
+ #:use-module (gnu packages curl)
|
|
|
+ #:use-module (gnu packages javascript)
|
|
|
+ #:use-module (gnu packages pcre)
|
|
|
+ #:use-module (gnu packages perl)
|
|
|
+ #:use-module (gnu packages readline)
|
|
|
+ #:use-module (gnu packages web)
|
|
|
+ #:use-module ((guix licenses) #:prefix license:))
|
|
|
+
|
|
|
+(define-public edbrowse
|
|
|
+ (package
|
|
|
+ (name "edbrowse")
|
|
|
+ (version "3.7.7")
|
|
|
+ (source
|
|
|
+ (origin
|
|
|
+ (method git-fetch)
|
|
|
+ (uri (git-reference
|
|
|
+ (url "https://github.com/CMB/edbrowse")
|
|
|
+ (commit (string-append "v" version))))
|
|
|
+ (file-name (git-file-name name version))
|
|
|
+ (sha256
|
|
|
+ (base32
|
|
|
+ "0cw9d60mdhwna57r1vxn53s8gl81rr3cxnvm769ifq3xyh49vfcf"))))
|
|
|
+ (build-system gnu-build-system)
|
|
|
+ (native-inputs
|
|
|
+ `(("perl" ,perl)))
|
|
|
+ (inputs
|
|
|
+ `(("curl" ,curl)
|
|
|
+ ("duktape" ,duktape)
|
|
|
+ ("pcre" ,pcre)
|
|
|
+ ("readline" ,readline)
|
|
|
+ ("tidy" ,tidy-html)))
|
|
|
+ (arguments
|
|
|
+ `(#:make-flags
|
|
|
+ (list (string-append "prefix=" %output)
|
|
|
+ "CC=gcc")
|
|
|
+ #:modules ((ice-9 popen)
|
|
|
+ (guix build gnu-build-system)
|
|
|
+ (guix build utils))
|
|
|
+ #:phases
|
|
|
+ (modify-phases %standard-phases
|
|
|
+ (delete 'configure)
|
|
|
+ (replace 'check
|
|
|
+ (lambda _
|
|
|
+ (with-directory-excursion "src"
|
|
|
+ (setenv "HOME" "/tmp")
|
|
|
+ ;; First invocation creates config, exits with 99
|
|
|
+ (system* "./edbrowse")
|
|
|
+ ;; Second runs javascript regression test
|
|
|
+ (let ((pipe (open-pipe* OPEN_WRITE
|
|
|
+ "./edbrowse" "-d" "./jsrt")))
|
|
|
+ (display "q\n" pipe)
|
|
|
+ (let ((code (close-pipe pipe)))
|
|
|
+ (unless (zero? code)
|
|
|
+ (error "test failed"))
|
|
|
+ #t)))))
|
|
|
+ (replace 'install
|
|
|
+ (lambda* (#:key make-flags #:allow-other-keys)
|
|
|
+ (apply invoke "make" "-C" "src" "install" make-flags))))))
|
|
|
+ (home-page "https://www.edbrowse.org")
|
|
|
+ (synopsis "Command line editor browser")
|
|
|
+ (description "Edbrowse is a combination editor, browser, and mail client
|
|
|
+that is 100% text based. The interface is similar to ed, though there are
|
|
|
+many more features, such as editing multiple files simultaneously, rendering
|
|
|
+html, and taping into databases through odbc.")
|
|
|
+ (license license:gpl3+)))
|