unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: conkeror: install conkeror-spawn-helper.
@ 2014-10-07 22:35 Eric Bavier
  2014-10-08  9:47 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2014-10-07 22:35 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

This patch to the conkeror package builds and installs the
conkeror-spawn-helper executable.  With it, you should be able to do
things like launch evince to view a pdf link.


[-- Attachment #2: 0001-gnu-conkeror-install-conkeror-spawn-helper.patch --]
[-- Type: text/x-diff, Size: 5882 bytes --]

From 16e2259eb3860686a30d40e94c4c5bd39d60dfe0 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Tue, 7 Oct 2014 17:33:00 -0500
Subject: [PATCH] gnu: conkeror: install conkeror-spawn-helper.

* gnu/packages/conkeror.scm (conkeror)[build-system]: Change to
  gnu-build-system.  Adjust arguments accordingly.
  [inputs]: Remove now-implicit bash.
  [native-inputs]: Remove now-implicit tar and gzip.
  [description]: Fix two-space-after-end-of-sentence.  Remove comment
  about separate conkeror-spawn-process-helper package.
---
 gnu/packages/conkeror.scm |   79 ++++++++++++++++++++-------------------------
 1 file changed, 35 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/conkeror.scm b/gnu/packages/conkeror.scm
index d39bcf2..51bb1a2 100644
--- a/gnu/packages/conkeror.scm
+++ b/gnu/packages/conkeror.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Cyrill Schenkel <cyrill.schenkel@gmail.com>
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -20,13 +21,9 @@
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system trivial)
+  #:use-module (guix build-system gnu)
   #:use-module (gnu packages)
-  #:use-module (gnu packages gnuzilla)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages bash)
-  #:use-module (gnu packages compression)
-  #:use-module (ice-9 format))
+  #:use-module (gnu packages gnuzilla))
 
 (define-public conkeror
   (package
@@ -41,52 +38,46 @@
               (sha256
                (base32
                 "1cgjzi7g3g22zcx6bpfnid4i12sb45w6icmxdzjn8d3c0m8qsyp1"))))
-    (build-system trivial-build-system)
-    (inputs `(("icecat" ,icecat)
-              ("bash" ,bash)))
-    (native-inputs `(("tar" ,tar)
-                     ("gzip" ,gzip)))
+    (build-system gnu-build-system)
+    (inputs `(("icecat" ,icecat)))
     (arguments
-     `(#:modules ((guix build utils))
-       #:builder (begin
-                   (use-modules (ice-9 ftw)
-                                (guix build utils))
-                   (let ((select? 
-                          (lambda (name)
-                           (not (equal? (car (string->list name)) #\.))))
-                         (datadir (string-append %output "/share/conkeror"))
-                         (launcher "bin/conkeror"))
-                     (setenv "PATH" (string-append
-                                     (assoc-ref %build-inputs "tar") "/bin:"
-                                     (assoc-ref %build-inputs "gzip") "/bin"))
-                     (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
-                     (copy-recursively (string-append
-                                        (getcwd) "/"
-                                        (car (scandir (getcwd) select?)))
-                                       datadir)
-                     (chdir %output)
-                     (mkdir "bin")
-                     (call-with-output-file launcher
-                       (lambda (p)
-                         (format p "#!~a/bin/bash
+     `(#:tests? #f                      ;no tests
+       #:make-flags '("CC=gcc")
+       #:phases
+       (alist-delete
+        'configure
+        (alist-replace
+         'install
+         (lambda _
+           (begin
+             (use-modules (guix build utils))
+             (let* ((datadir  (string-append %output "/share/conkeror"))
+                    (bindir   (string-append %output "/bin"))
+                    (launcher (string-append bindir  "/conkeror"))
+                    (spawn    (string-append bindir  "/conkeror-spawn-helper")))
+               (copy-recursively "." datadir)
+               (mkdir-p bindir)
+               (copy-file "conkeror-spawn-helper" spawn)
+               (call-with-output-file launcher
+                 (lambda (p)
+                   (format p "#!~a/bin/bash
 exec ~a/bin/icecat --app ~a \"$@\"~%"
-                                 (assoc-ref %build-inputs "bash")
-                                 (assoc-ref %build-inputs "icecat")
-                                 (string-append datadir
-                                                "/application.ini"))))
-                     (chmod launcher #o555)))))
+                           (assoc-ref %build-inputs "bash") ;implicit input
+                           (assoc-ref %build-inputs "icecat")
+                           (string-append datadir
+                                          "/application.ini"))))
+               (chmod launcher #o555))))
+         %standard-phases))))
     (synopsis "Keyboard focused web browser with Emacs look and feel")
     (description "Conkeror is a highly-programmable web browser based on
-Mozilla XULRunner which is the base of all Mozilla products including
-Firefox. Conkeror has a sophisticated keyboard system for running commands and
-interacting with web page content, modelled after Emacs and Lynx. It is
+Mozilla XULRunner which is the base of all Mozilla products including Firefox.
+Conkeror has a sophisticated keyboard system for running commands and
+interacting with web page content, modelled after Emacs and Lynx.  It is
 self-documenting and extensible with JavaScript.
 
 It comes with builtin support for several Web 2.0 sites like several Google
 services (Search, Gmail, Maps, Reader, etc.), Del.icio.us, Reddit, Last.fm and
-YouTube. For easier editing of form fields, it can spawn external editors. For
-this feature the recommended conkeror-spawn-process-helper package needs to be
-installed.")
+YouTube.  For easier editing of form fields, it can spawn external editors.")
     (home-page "http://conkeror.org")
     ;; Conkeror is triple licensed.
     (license (list license:gpl2
-- 
1.7.9.5


[-- Attachment #3: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: conkeror: install conkeror-spawn-helper.
  2014-10-07 22:35 [PATCH] gnu: conkeror: install conkeror-spawn-helper Eric Bavier
@ 2014-10-08  9:47 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-10-08  9:47 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> skribis:

> From 16e2259eb3860686a30d40e94c4c5bd39d60dfe0 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Tue, 7 Oct 2014 17:33:00 -0500
> Subject: [PATCH] gnu: conkeror: install conkeror-spawn-helper.
>
> * gnu/packages/conkeror.scm (conkeror)[build-system]: Change to
>   gnu-build-system.  Adjust arguments accordingly.
>   [inputs]: Remove now-implicit bash.
>   [native-inputs]: Remove now-implicit tar and gzip.
>   [description]: Fix two-space-after-end-of-sentence.  Remove comment
>   about separate conkeror-spawn-process-helper package.

OK to push.

(I had got used to spawning the PDF viewer by hand, but this is
definitely an improvement!)

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-08  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 22:35 [PATCH] gnu: conkeror: install conkeror-spawn-helper Eric Bavier
2014-10-08  9:47 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).