From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4EIUCnzaOF9sEgAA0tVLHw (envelope-from ) for ; Sun, 16 Aug 2020 07:04:28 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CBvoBXzaOF/aKwAA1q6Kng (envelope-from ) for ; Sun, 16 Aug 2020 07:04:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B07C1940606 for ; Sun, 16 Aug 2020 07:04:27 +0000 (UTC) Received: from localhost ([::1]:54216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k7CiQ-0004eH-Me for larch@yhetil.org; Sun, 16 Aug 2020 03:04:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44320) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k7Ci4-0004Rc-6c for guix-patches@gnu.org; Sun, 16 Aug 2020 03:04:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45199) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k7Ci3-0002Zo-Sd for guix-patches@gnu.org; Sun, 16 Aug 2020 03:04:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k7Ci3-0002zh-OK for guix-patches@gnu.org; Sun, 16 Aug 2020 03:04:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42885] [PATCH 4/4] gnu: calibre: Add wrap phase for qtwebengine. Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 16 Aug 2020 07:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42885 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42885@debbugs.gnu.org Received: via spool by 42885-submit@debbugs.gnu.org id=B42885.159756143611475 (code B ref 42885); Sun, 16 Aug 2020 07:04:03 +0000 Received: (at 42885) by debbugs.gnu.org; 16 Aug 2020 07:03:56 +0000 Received: from localhost ([127.0.0.1]:56742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7Chw-0002yv-9m for submit@debbugs.gnu.org; Sun, 16 Aug 2020 03:03:56 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:38326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k7Chq-0002y5-8k for 42885@debbugs.gnu.org; Sun, 16 Aug 2020 03:03:51 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4BTp741wK8zKmRG for <42885@debbugs.gnu.org>; Sun, 16 Aug 2020 09:03:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brendan.scot; s=MBO0001; t=1597561422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A+XPo0B365MqUcsjP3ScBwgKVFLPGoM+IPhUt9pcfys=; b=A9VWZyu2mXpM45sG0yxKg8zWOeDFWjjC2rnIZfY7664LDOtV59L1pzkbYLtdPcBLQlDJu/ NorbnIk0D0FH43MhU4zlXecxa365vIpflIFQ9FQG9yG4Ejwa7q7F1KhV/i02DcJQztPKws ceHLNP58fzEQmxy6AxW4hAPaseQlIjbOrQVIRP5R8P/ZIjcjaDE//fV2X5LDmSX4BWv3p/ sMvp3ampfXVadIH7hfHUCql6ZbPc2drolirQv7fzN13CnNqLcoYSywTfLMet3T8if5bJt/ WTDRknlyNajcb4JEn6MssqvrflGdB4Aw56v/M/WSCMBydSj+uPy7tU7mTn2btg== Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id XCMkxp6QCSRT for <42885@debbugs.gnu.org>; Sun, 16 Aug 2020 09:03:41 +0200 (CEST) From: Brendan Tildesley Date: Sun, 16 Aug 2020 17:03:18 +1000 Message-Id: <20200816070318.18642-4-mail@brendan.scot> In-Reply-To: <20200816070318.18642-1-mail@brendan.scot> References: <20200816070318.18642-1-mail@brendan.scot> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-SPAM-Probability: X-Rspamd-Score: -0.54 / 15.00 / 15.00 X-Rspamd-Queue-Id: 2CD761738 X-Rspamd-UID: 72c7d2 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 6.49 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=brendan.scot header.s=MBO0001 header.b=A9VWZyu2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam: Yes X-TUID: /OCCDJJ8Ac6o * gnu/packages/ebook.scm (calibre): [arguments]: Copy the wrap phase from Anki to wrap QTWEBENGINEPROCESS_PATH. This fixes the 'Could not find QtWebEngineProcess error' when opening a book with the ebook-viewer. --- gnu/packages/ebook.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm index a434f56bc1..31864a0786 100644 --- a/gnu/packages/ebook.scm +++ b/gnu/packages/ebook.scm @@ -165,7 +165,10 @@ ("qtwebengine" ,qtwebengine) ("sqlite" ,sqlite))) (arguments - `(#:python ,python-2 + `(#:modules ((guix build python-build-system) + (guix build utils) + (ice-9 match)) + #:python ,python-2 ;; Calibre is using setuptools by itself, but the setup.py is not ;; compatible with the shim wrapper (taken from pip) we are using. #:use-setuptools? #f @@ -252,6 +255,35 @@ "man-pages" (string-append (assoc-ref outputs "out") "/share/man")) #t)) + ;; wrap phase copied from anki package. + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin")) + ;; List of paths to the site-packages directories of Python + ;; library inputs. + (site-packages + (map (lambda (pyinput) + (string-append + (cdr pyinput) + "/lib/python2.7/site-packages")) + (filter (match-lambda + ((label . _) + (string-prefix? "python2-" label))) + inputs))) + (qtwebengineprocess + (string-append (assoc-ref inputs "qtwebengine") + "/lib/qt5/libexec/QtWebEngineProcess"))) + ;; The program fails to find the QtWebEngineProcess program, so + ;; we set QTWEBENGINEPROCESS_PATH to help it. PYTHONPATH is + ;; wrapped to avoid declaring Python libraries as propagated + ;; inputs. + (for-each (lambda (program) + (wrap-program program + `("QTWEBENGINEPROCESS_PATH" = + (,qtwebengineprocess)) + `("PYTHONPATH" = ,site-packages))) + (find-files bin "."))) + #t)) ;; The font TTF files are used in some miscellaneous tests, so we ;; unbundle them here to avoid patching the tests. (add-after 'install 'unbundle-font-liberation -- 2.28.0