unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Rohleder <mike@rohleder.de>
To: 45880@debbugs.gnu.org
Subject: [bug#45880] [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs.
Date: Fri, 15 Jan 2021 02:58:02 +0100	[thread overview]
Message-ID: <20210115015802.571-1-mike@rohleder.de> (raw)

* 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





             reply	other threads:[~2021-01-15  2:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15  1:58 Michael Rohleder [this message]
2021-01-15 20:38 ` bug#45880: [PATCH] gnu: emacs-calibredb: Patch paths to calibre programs Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210115015802.571-1-mike@rohleder.de \
    --to=mike@rohleder.de \
    --cc=45880@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).