unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#43287] [PATCH] gnu: emacs-djvu: Add needed inputs
@ 2020-09-09  2:21 Morgan.J.Smith
  2020-09-13 21:28 ` bug#43287: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Morgan.J.Smith @ 2020-09-09  2:21 UTC (permalink / raw)
  To: 43287; +Cc: Morgan Smith

From: Morgan Smith <Morgan.J.Smith@outlook.com>

* gnu/packages/emacs-xyz.scm (emacs-djvu): Add needed inputs
---
 gnu/packages/emacs-xyz.scm | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 0b1c79de79..6138ccc27a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -118,6 +118,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dictionaries)
+  #:use-module (gnu packages djvu)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
@@ -2456,13 +2457,30 @@ filters, new key bindings and faces.  It can be enabled by
        (sha256
         (base32 "0njgyx09q225hliacsnjk8wallg5i6xkz6bj501pb05nwqfbvfk7"))))
     (build-system emacs-build-system)
+    (inputs `(("djview" ,djview)
+              ("djvulibre" ,djvulibre)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((file "djvu.el")
+                   (djview (assoc-ref inputs "djview"))
+                   (djvulibre (assoc-ref inputs "djvulibre")))
+               ;; Specify the absolute executable locations.
+               (chmod file #o644)
+               (substitute* file
+                 (("\"djvused\"") (string-append "\"" djvulibre "/bin/djvused\""))
+                 (("\"djvm\"") (string-append "\"" djvulibre "/bin/djvm\""))
+                 (("\"ddjvu\"") (string-append "\"" djvulibre "/bin/ddjvu\"")))
+               (emacs-substitute-variables file
+                 ("djvu-djview-command" (string-append djview "/bin/djview"))))
+             #t)))))
     (home-page "http://elpa.gnu.org/packages/djvu.html")
     (synopsis "Edit and view Djvu files via djvused")
     (description
      "This package is a front end for the command-line program djvused from
-DjVuLibre, see @url{http://djvu.sourceforge.net/}.  It assumes you have the
-programs @command{djvused}, @command{djview}, @command{ddjvu}, and
-@command{djvm} installed.")
+DjVuLibre, see @url{http://djvu.sourceforge.net/}.")
     (license license:gpl3+)))
 
 (define-public emacs-pabbrev
-- 
2.28.0





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

* bug#43287: [PATCH] gnu: emacs-djvu: Add needed inputs
  2020-09-09  2:21 [bug#43287] [PATCH] gnu: emacs-djvu: Add needed inputs Morgan.J.Smith
@ 2020-09-13 21:28 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-09-13 21:28 UTC (permalink / raw)
  To: Morgan.J.Smith; +Cc: 43287-done

Hi,

Morgan.J.Smith@outlook.com skribis:

> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/emacs-xyz.scm (emacs-djvu): Add needed inputs

I tweaked the commit message to mention the new ‘inputs’ and ‘arguments’
fields.

Applied, thanks!

Ludo’.




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

end of thread, other threads:[~2020-09-13 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09  2:21 [bug#43287] [PATCH] gnu: emacs-djvu: Add needed inputs Morgan.J.Smith
2020-09-13 21:28 ` bug#43287: " Ludovic Courtès

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git