Subject: bug#45880: closed (Re: [bug#45880] [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs.)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 15 Jan 2021 20:39:01 +0000

Your bug report

#45880: [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
45880: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45880
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#45880] [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs.
From: Nicolas Goaziou <[email-masked]>
To: Michael Rohleder <[email-masked]>
Cc: [email-masked]
Date: Fri, 15 Jan 2021 21:38:13 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

Michael Rohleder <[email-masked]> writes:

> * gnu/packages/emacs-xyz.scm (emacs-calibredb): Patch paths to calibre programs.
> [arguments]: Add phase patch-paths.
> [inputs]: Add calibre.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou

Subject: [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs.
From: Michael Rohleder <[email-masked]>
To: [email-masked]
Cc: Michael Rohleder <[email-masked]>
Date: Fri, 15 Jan 2021 02:58:02 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/emacs-xyz.scm (emacs-calibredb): Patch paths to calibre programs.
[arguments]: Add phase patch-paths.
[inputs]: Add calibre.
---
 gnu/packages/emacs-xyz.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e35a29cdc3..19db9278c5 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -131,6 +131,7 @@
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dictionaries)
   #:use-module (gnu packages djvu)
+  #:use-module (gnu packages ebook)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages gtk)
@@ -22694,6 +22695,21 @@ through Dash docsets.")
        (sha256
         (base32 "19gc05k2p1l8wlkrqij9cw6d61hzknd6a9n64kzlpi87cpbav3lv"))))
     (build-system emacs-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((calibre (assoc-ref inputs "calibre")))
+               (make-file-writable "calibredb-core.el")
+               (emacs-substitute-variables "calibredb-core.el"
+                 ("calibredb-program"
+                  (string-append calibre "/bin/calibredb"))
+                 ("calibredb-fetch-metadata-program"
+                  (string-append calibre "/bin/fetch-ebook-metadata"))))
+             #t)))))
+    (inputs
+     `(("calibre" ,calibre)))
     (propagated-inputs
      `(("emacs-dash" ,emacs-dash)
        ("emacs-s" ,emacs-s)
-- 
2.30.0