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 UPB2NOq53F9jXQAA0tVLHw (envelope-from ) for ; Fri, 18 Dec 2020 14:17:14 +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 iN5KMOq53F93HAAA1q6Kng (envelope-from ) for ; Fri, 18 Dec 2020 14:17:14 +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 7DCA59402A2 for ; Fri, 18 Dec 2020 14:17:14 +0000 (UTC) Received: from localhost ([::1]:58902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqGZF-00062h-BH for larch@yhetil.org; Fri, 18 Dec 2020 09:17:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqGZ4-00060T-OR for bug-guix@gnu.org; Fri, 18 Dec 2020 09:17:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqGZ4-00028W-Fc for bug-guix@gnu.org; Fri, 18 Dec 2020 09:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqGZ4-0000GD-9c for bug-guix@gnu.org; Fri, 18 Dec 2020 09:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45270: [PATCH] gnu: gnome-builder: Fix python and GI paths. References: In-Reply-To: Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 18 Dec 2020 14:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45270 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 45270@debbugs.gnu.org Received: via spool by 45270-submit@debbugs.gnu.org id=B45270.1608301008976 (code B ref 45270); Fri, 18 Dec 2020 14:17:02 +0000 Received: (at 45270) by debbugs.gnu.org; 18 Dec 2020 14:16:48 +0000 Received: from localhost ([127.0.0.1]:38184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqGYq-0000Fg-8p for submit@debbugs.gnu.org; Fri, 18 Dec 2020 09:16:48 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:6046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqGYo-0000FW-1H for 45270@debbugs.gnu.org; Fri, 18 Dec 2020 09:16:47 -0500 Received: from localhost.localdomain (217-149-174-13.nat.highway.telekom.at [217.149.174.13]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4Cy9sQ3ckTz3xQh; Fri, 18 Dec 2020 15:16:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1608301002; bh=czVwKahHQAelrF69bd4Uw9uNa4BWGIsflNepjjeKVDE=; h=From:To:Cc:Subject:Date; b=p4IPxLLnOE7u2ASsTsqG/qHUMW/ch1rwdsOOTpEdXcoujQNjd8WyoshmDnv3eRZn9 WwqBBBKPFLM5dJ2KsPkX6Xn6qIBpKiukkKQFJGvHCvC/hndaj/a0CRwkFJJbtx7ssL 1zWMCQv5oDQksO7USjRzWohGTyUH33VkaPC/goV4= From: Leo Prikler Date: Fri, 18 Dec 2020 15:16:16 +0100 Message-Id: <20201218141616.31908-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: luis.felipe.la@protonmail.com Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 3.78 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=p4IPxLLn; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 7DCA59402A2 X-Spam-Score: 3.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: GHgVqxyMzGDF This patch fixes #45270 by patching PYTHON_PATH at application start time and prepending "the correct" GI typelib paths at plugin load time. * gnu/packages/gnome.scm (gnome-builder)[#:phases]: Add python-wrap and patch-gi-repository-path. --- gnu/packages/gnome.scm | 49 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 6b2ddf15f3..5a166d1b86 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -11890,6 +11890,38 @@ libraries. Applications do not need to be recompiled--or even restarted.") (string-append (assoc-ref inputs "python-pygobject") "/lib"))) #t)) + (add-after 'unpack 'patch-gi-repository-path + (lambda* (#:key inputs #:allow-other-keys) + (letrec ((gir (lambda (input) + (string-append (assoc-ref inputs input) + "/lib/girepository-1.0"))) + (prepend + (lambda (path) + (let ((fn "g_irepository_prepend_search_path")) + (format #f "~a (~s);~% " fn path)))) + (prepend-gir (lambda (input) (prepend (gir input))))) + (substitute* "src/libide/gui/ide-application-plugins.c" + (("g_irepository_prepend_search_path .*" all) + ;; TODO: Try to establish working set. + (string-append + (prepend-gir "template-glib") + (prepend-gir "at-spi2-core") + (prepend-gir "atk") + (prepend-gir "harfbuzz") + (prepend-gir "pango") + (prepend-gir "gtk+") + ;; XXX: Adding gdk-pixbuf results in a load error, despite + ;; it being needed. + ;; (prepend-gir "gdk-pixbuf") + (prepend-gir "json-glib") + (prepend-gir "jsonrpc-glib") + (prepend-gir "libdazzle") + (prepend-gir "libpeas") + (prepend-gir "libsoup") + (prepend-gir "vte") + (prepend-gir "webkitgtk") + (prepend-gir "gtksourceview") + all)))))) (add-after 'configure 'fix-ninja (lambda _ ;; #43296: meson(?) incorrectly assumes we want to link @@ -11901,7 +11933,22 @@ libraries. Applications do not need to be recompiled--or even restarted.") (lambda _ (system "Xvfb :1 &") (setenv "DISPLAY" ":1") - #t))))) + #t)) + (add-after 'glib-or-gtk-wrap 'python-wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((prog (string-append (assoc-ref outputs "out") + "/bin/gnome-builder")) + (lib (string-append (assoc-ref outputs "out") + "/lib"))) + (wrap-program prog + `("PYTHONPATH" = (,(string-append lib + "/python" + ,(version-major+minor + (package-version + python)) + "/site-packages") + ,(getenv "PYTHONPATH")))) + #t)))))) (inputs `(("devhelp" ,devhelp) ("gspell" ,gspell) -- 2.29.2