* bug#45270: GNOME Builder: I can't start a new project
@ 2020-12-16 15:06 Luis Felipe via Bug reports for GNU Guix
2020-12-18 14:16 ` bug#45270: [PATCH] gnu: gnome-builder: Fix python and GI paths Leo Prikler
0 siblings, 1 reply; 2+ messages in thread
From: Luis Felipe via Bug reports for GNU Guix @ 2020-12-16 15:06 UTC (permalink / raw)
To: 45270
## Steps to reproduce
1. Launch GNOME Builder
2. Click on "Start New Project..."
3. Fill all required fields
## Expected result
The "Create Project" button gets enabled and you can click on it to create the project.
Example: https://builder.readthedocs.io/en/latest/_images/start-new-project.png
## Unexpected result
The "Create Project" button remains disabled, probably because the "Language" field does not display any language options to select, and selecting a language is required.
Example: https://luis-felipe.gitlab.io/media/2020/12/gnu-guix-gnome-builder-start-new-project-2020-12-16.png
Also, note that the "Select a Template" section does not show any templates. Although selecting a template is not required to start a project.
## System information
guix 08d8c2d
gnome-builder 3.36.1
## Additional information
I see the following output when I start gnome-builder from a terminal and follow the steps above:
$ gnome-builder
sh: getent: command not found
10:00:42.7874 ide-application-plugins[ 17100]: CRITICAL: Cannot enable Python 3 plugins: Typelib file for namespace 'Dazzle', version '1.0' not found
10:00:42.7916 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7917 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7918 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7918 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7918 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7918 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7919 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7920 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7920 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7921 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7921 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7921 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7921 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7921 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7922 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7922 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7922 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7923 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7930 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7930 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.7991 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.8012 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.8014 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
10:00:42.8014 libpeas[ 17100]: WARNING: The 'python3' plugin loader has not been enabled
---
Luis Felipe López Acevedo
https://luis-felipe.gitlab.io/
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#45270: [PATCH] gnu: gnome-builder: Fix python and GI paths.
2020-12-16 15:06 bug#45270: GNOME Builder: I can't start a new project Luis Felipe via Bug reports for GNU Guix
@ 2020-12-18 14:16 ` Leo Prikler
0 siblings, 0 replies; 2+ messages in thread
From: Leo Prikler @ 2020-12-18 14:16 UTC (permalink / raw)
To: 45270; +Cc: luis.felipe.la
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-18 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 15:06 bug#45270: GNOME Builder: I can't start a new project Luis Felipe via Bug reports for GNU Guix
2020-12-18 14:16 ` bug#45270: [PATCH] gnu: gnome-builder: Fix python and GI paths Leo Prikler
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).