GNU bug report logs - #56169
[PATCH] gnu: Add cambalache.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Thu, 23 Jun 2022 15:02:02 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56169 in the body.
You can then email your comments to 56169 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Thu, 23 Jun 2022 15:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 23 Jun 2022 15:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add cambalache.
Date: Thu, 23 Jun 2022 16:17:23 +0200
* gnu/packages/gnome.scm (cambalache): New variable.
---
 gnu/packages/gnome.scm | 75 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 0cde3caebd..71667086f4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3208,6 +3208,81 @@ (define-public glade3
                                 (variable "GLADE_MODULE_SEARCH_PATH")
                                 (files '("lib/glade/modules")))))))
 
+(define-public cambalache
+  (package
+   (name "cambalache")
+   (version "0.10.2")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://gitlab.gnome.org/jpu/cambalache")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32 "1mw5gk98zx03yal3p8slaqwhwkc9p2vnh0cssnmg6ivxsjscqhgz"))))
+   (build-system meson-build-system)
+   (arguments
+    (list
+     #:glib-or-gtk? #t
+     #:imported-modules `((guix build python-build-system)
+                          ,@%meson-build-system-modules)
+     #:modules '((guix build meson-build-system)
+                 ((guix build python-build-system) #:prefix python:)
+                 (guix build utils))
+     #:phases
+     #~(modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "cambalache/cmb_view.py"
+               (("GLib\\.find_program_in_path\\('(.*)'\\)" all cmd)
+                (string-append "'"
+                               (search-input-file inputs
+                                                  (string-append "/bin/" cmd))
+                               "'")))))
+         (add-after 'unpack 'patch-build
+           (lambda _
+             (substitute* "postinstall.py"
+               (("update-desktop-database") "true"))))
+         (add-after 'wrap 'python-wrap (assoc-ref python:%standard-phases 'wrap))
+         (delete 'check)
+         (add-after 'install 'add-install-to-pythonpath
+           (assoc-ref python:%standard-phases 'add-install-to-pythonpath))
+         (add-after 'add-install-to-pythonpath 'pre-check
+           (lambda _
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")))
+         (add-after 'pre-check 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion ".."
+                 (invoke "python3" "-m" "pytest")))))
+         (add-after 'glib-or-gtk-wrap 'wrap-typelib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each
+              (lambda (prog)
+                (unless (wrapped-program? prog)
+                  (wrap-program
+                   prog
+                   `("GI_TYPELIB_PATH" suffix (,(getenv "GI_TYPELIB_PATH"))))))
+              (find-files (string-append (assoc-ref outputs "out")
+                                         "/bin"))))))))
+   (inputs (list bash-minimal
+                 python python-pygobject python-lxml
+                 gtk
+                 `(,gtk+ "bin") ; broadwayd
+                 `(,gtk "bin")
+                 webkitgtk-with-libsoup2))
+   (native-inputs (list `(,glib "bin") gobject-introspection
+                        gettext-minimal pkg-config
+                        python-pytest xorg-server-for-tests))
+   (home-page "https://gitlab.gnome.org/jpu/cambalache")
+   (synopsis "Rapid application development tool")
+   (description "Cambalache is a rapid application development (RAD) tool for
+Gtk 4 and 3 with a clear model-view-controller (MVC) design and
+data model first philosophy.")
+   (license (list license:lgpl2.1
+                  license:gpl2)))) ; tools
+
 (define-public libcroco
   (package
     (name "libcroco")
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Wed, 29 Jun 2022 07:22:01 GMT) Full text and rfc822 format available.

Message #8 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add cambalache.
Date: Wed, 29 Jun 2022 09:21:21 +0200
Hi Liliana,

Thanks for packaging Cambalache :-) I have applied your patch to my
local Guix checkout and it builds fine.  However, running

    ./pre-inst-env guix shell cambalache -- cambalace

Cambalache starts up but I am unable to add any widgets.  There are some
error messages written to stderr that complain about a missing
typelib: CambalachePrivate.  I see that you wrap the programme but you
did not include the path to the CambalachePrivate typelib.  So maybe
this is causing the problem?

Additionally, the icons in the headerbar are missing.  This seems to be
related to:

Missing dependency for Xournal++
https://issues.guix.gnu.org/51968

Best

-- 
Daniel




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Wed, 29 Jun 2022 17:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add cambalache.
Date: Wed, 29 Jun 2022 18:59:07 +0200
Am Mittwoch, dem 29.06.2022 um 09:21 +0200 schrieb Daniel Meißner:
> Hi Liliana,
> 
> Thanks for packaging Cambalache :-) I have applied your patch to my
> local Guix checkout and it builds fine.  However, running
> 
>     ./pre-inst-env guix shell cambalache -- cambalace
> 
> Cambalache starts up but I am unable to add any widgets.  There are
> some error messages written to stderr that complain about a missing
> typelib: CambalachePrivate.  I see that you wrap the programme but
> you did not include the path to the CambalachePrivate typelib.  So
> maybe this is causing the problem?
Thanks, I'll update the patch accordingly soon™.

> Additionally, the icons in the headerbar are missing.  This seems to
> be related to:
> 
> Missing dependency for Xournal++
> https://issues.guix.gnu.org/51968
For this class of bugs, I'd always try to include glib in the guix
shell and check if the issue persists.  We don't build icon caches per
package, so the only way to fix that is to get XDG_DATA_DIRS into your
profile.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Thu, 30 Jun 2022 09:17:01 GMT) Full text and rfc822 format available.

Message #14 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: bug#56169: [PATCH] gnu: Add cambalache.
Date: Thu, 30 Jun 2022 11:16:30 +0200
Liliana Marie Prikler writes:

> Am Mittwoch, dem 29.06.2022 um 09:21 +0200 schrieb Daniel Meißner:
>> Hi Liliana,
>> 
>> Thanks for packaging Cambalache :-) I have applied your patch to my
>> local Guix checkout and it builds fine.  However, running
>> 
>>     ./pre-inst-env guix shell cambalache -- cambalace
>> 
>> Cambalache starts up but I am unable to add any widgets.  There are
>> some error messages written to stderr that complain about a missing
>> typelib: CambalachePrivate.  I see that you wrap the programme but
>> you did not include the path to the CambalachePrivate typelib.  So
>> maybe this is causing the problem?
> Thanks, I'll update the patch accordingly soon™.

I did a first try by wrapping the programme as follows:

--8<---------------cut here---------------start------------->8---
(wrap-program prog
              `("GI_TYPELIB_PATH"
                suffix
                (,(getenv "GI_TYPELIB_PATH")
                 ,(string-append #$output "/lib/girepository-1.0"))))
--8<---------------cut here---------------end--------------->8---

Now, with this, cambalache finds the typelib but complains on two other
things:

1. There's another typelib called Adw which is not found
2. gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der Bilddatei unbekannt (3)

Now 2. is more severe since it occurs when I add for example a
GtkApplicationWindow to the project.  This widget does not show up and I
cannot add other widgets to the application window.


>> Additionally, the icons in the headerbar are missing.  This seems to
>> be related to:
>> 
>> Missing dependency for Xournal++
>> https://issues.guix.gnu.org/51968
> For this class of bugs, I'd always try to include glib in the guix
> shell and check if the issue persists.  We don't build icon caches per
> package, so the only way to fix that is to get XDG_DATA_DIRS into your
> profile.

Thanks for the hint.  IIUC, the inclusion of glib into the profile
triggers a hook for generating the appropiate XDG_DATA_DIRS env variable
into the profile, right?  Is the reason why icon caches are not
per-package so that different icon-themes can work?  Sorry, this is
taking an orthogonal direction.

Best

-- 
Daniel




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Thu, 30 Jun 2022 15:26:01 GMT) Full text and rfc822 format available.

Message #17 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: bug#56169: [PATCH] gnu: Add cambalache.
Date: Thu, 30 Jun 2022 17:25:20 +0200
Am Donnerstag, dem 30.06.2022 um 11:16 +0200 schrieb Daniel Meißner:
> Liliana Marie Prikler writes:
> 
> > Am Mittwoch, dem 29.06.2022 um 09:21 +0200 schrieb Daniel Meißner:
> > > Hi Liliana,
> > > 
> > > Thanks for packaging Cambalache :-) I have applied your patch to
> > > my
> > > local Guix checkout and it builds fine.  However, running
> > > 
> > >     ./pre-inst-env guix shell cambalache -- cambalace
> > > 
> > > Cambalache starts up but I am unable to add any widgets.  There
> > > are
> > > some error messages written to stderr that complain about a
> > > missing
> > > typelib: CambalachePrivate.  I see that you wrap the programme
> > > but
> > > you did not include the path to the CambalachePrivate typelib. 
> > > So
> > > maybe this is causing the problem?
> > Thanks, I'll update the patch accordingly soon™.
> 
> I did a first try by wrapping the programme as follows:
> 
> --8<---------------cut here---------------start------------->8---
> (wrap-program prog
>               `("GI_TYPELIB_PATH"
>                 suffix
>                 (,(getenv "GI_TYPELIB_PATH")
>                  ,(string-append #$output "/lib/girepository-1.0"))))
> --8<---------------cut here---------------end--------------->8---
> 
> Now, with this, cambalache finds the typelib but complains on two
> other things:
> 
> 1. There's another typelib called Adw which is not found
Should be resolved by adding libadwaita to the inputs.
> 2. gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der
> Bilddatei unbekannt (3)
A broken image?  Any supporting hints like file paths?

> Now 2. is more severe since it occurs when I add for example a
> GtkApplicationWindow to the project.  This widget does not show up
> and I cannot add other widgets to the application window.
> 
> > > Additionally, the icons in the headerbar are missing.  This seems
> > > to
> > > be related to:
> > > 
> > > Missing dependency for Xournal++
> > > https://issues.guix.gnu.org/51968
> > For this class of bugs, I'd always try to include glib in the guix
> > shell and check if the issue persists.  We don't build icon caches
> > per package, so the only way to fix that is to get XDG_DATA_DIRS
> > into your profile.
> 
> Thanks for the hint.  IIUC, the inclusion of glib into the profile
> triggers a hook for generating the appropiate XDG_DATA_DIRS env
> variable into the profile, right?  Is the reason why icon caches are
> not per-package so that different icon-themes can work?  Sorry, this
> is taking an orthogonal direction.
It's a practical limitation.  There is a single file, that would leat
to a very large number of conflicts, most of them harmless but still
time-consuming to resolve.  Thus we leave it to a profile hook to
actually generate the icon themes.   This hook runs regardless, but
XDG_DATA_DIRS won't be set by it.

Cheers




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Fri, 01 Jul 2022 11:39:02 GMT) Full text and rfc822 format available.

Message #20 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: bug#56169: [PATCH] gnu: Add cambalache.
Date: Fri, 01 Jul 2022 13:37:53 +0200
Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:

> Am Donnerstag, dem 30.06.2022 um 11:16 +0200 schrieb Daniel Meißner:
> [...]
>> 1. There's another typelib called Adw which is not found
> Should be resolved by adding libadwaita to the inputs.

Yep, it did resolve it.

>> 2. gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der
>> Bilddatei unbekannt (3)
> A broken image?  Any supporting hints like file paths?

There's a backtrace of a Python file.  Maybe that helps.

--8<---------------cut here---------------start------------->8---
(.cambalache-real:13827): Gtk-WARNING **: 13:32:30.577: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
Traceback (most recent call last):
  File "/gnu/store/ax5i4mwlwjhk3jwr3kfb41n48fczp9hv-cambalache-0.10.2/lib/python3.9/site-packages/cambalache/cmb_property_controls.py", line 562, in __load_icon_finish
    self.__model[data][6] = info.load_icon_finish(res)
gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der Bilddatei unbekannt (3)
--8<---------------cut here---------------end--------------->8---

Best

-- 
Daniel




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Fri, 01 Jul 2022 19:10:01 GMT) Full text and rfc822 format available.

Message #23 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: 56169 <at> debbugs.gnu.org
Cc: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Subject: [PATCH v2] gnu: Add cambalache.
Date: Thu, 23 Jun 2022 16:17:23 +0200
* gnu/packages/gnome.scm (cambalache): New variable.
---
 gnu/packages/gnome.scm | 83 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 0cde3caebd..1458a4cb5c 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3208,6 +3208,89 @@ (define-public glade3
                                 (variable "GLADE_MODULE_SEARCH_PATH")
                                 (files '("lib/glade/modules")))))))
 
+(define-public cambalache
+  (package
+   (name "cambalache")
+   (version "0.10.2")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://gitlab.gnome.org/jpu/cambalache")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32 "1mw5gk98zx03yal3p8slaqwhwkc9p2vnh0cssnmg6ivxsjscqhgz"))))
+   (build-system meson-build-system)
+   (arguments
+    (list
+     #:glib-or-gtk? #t
+     #:imported-modules `((guix build python-build-system)
+                          ,@%meson-build-system-modules)
+     #:modules '((guix build meson-build-system)
+                 ((guix build python-build-system) #:prefix python:)
+                 (guix build utils))
+     #:phases
+     #~(modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "cambalache/cmb_view.py"
+               (("GLib\\.find_program_in_path\\('(.*)'\\)" all cmd)
+                (string-append "'"
+                               (search-input-file inputs
+                                                  (string-append "/bin/" cmd))
+                               "'")))))
+         (add-after 'unpack 'patch-build
+           (lambda _
+             (substitute* "postinstall.py"
+               (("update-desktop-database") "true"))))
+         (add-after 'wrap 'python-wrap (assoc-ref python:%standard-phases 'wrap))
+         (delete 'check)
+         (add-after 'install 'add-install-to-pythonpath
+           (assoc-ref python:%standard-phases 'add-install-to-pythonpath))
+         (add-after 'add-install-to-pythonpath 'pre-check
+           (lambda _
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")))
+         (add-after 'pre-check 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion ".."
+                 (invoke "python3" "-m" "pytest")))))
+         (add-after 'glib-or-gtk-wrap 'wrap-typelib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (for-each
+                (lambda (prog)
+                  (unless (wrapped-program? prog)
+                    (wrap-program
+                        prog
+                      `("GI_TYPELIB_PATH" suffix
+                        (,(string-append out "/lib/girepository-1.0")
+                         ,(getenv "GI_TYPELIB_PATH"))))))
+                (find-files (string-append out "/bin")))))))))
+   (inputs (list bash-minimal
+                 libadwaita
+                 python python-pygobject python-lxml
+                 gtk
+                 `(,gtk+ "bin") ; broadwayd
+                 `(,gtk "bin")
+                 webkitgtk-with-libsoup2))
+   ;; XXX: inside a pure shell, the following need to exist as well
+   ;; (in addition to glib) for cambalache to function as expected
+   ;; (propagated-inputs (list adwaita-icon-theme
+   ;;                          gsettings-desktop-schemas
+   ;;                          (librsvg-for-system)))
+   (native-inputs (list `(,glib "bin") gobject-introspection
+                        gettext-minimal pkg-config
+                        python-pytest xorg-server-for-tests))
+   (home-page "https://gitlab.gnome.org/jpu/cambalache")
+   (synopsis "Rapid application development tool")
+   (description "Cambalache is a rapid application development (RAD) tool for
+Gtk 4 and 3 with a clear model-view-controller (MVC) design and
+data model first philosophy.")
+   (license (list license:lgpl2.1
+                  license:gpl2)))) ; tools
+
 (define-public libcroco
   (package
     (name "libcroco")
-- 
2.36.1





Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Wed, 13 Jul 2022 09:38:01 GMT) Full text and rfc822 format available.

Message #26 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: 56169 <at> debbugs.gnu.org
Subject: Re: bug#56169: [PATCH] gnu: Add cambalache.
Date: Wed, 13 Jul 2022 11:37:36 +0200
Hi Liliana,

I have tested v2 of your patch.  I installed cambalache into my user
profile using

./pre-inst-env guix install cambalache

Then launching a terminal from my DE (I use XFCE) and invoking
‘cambalache’.  It starts up fine, showing the Cambalache logo.  I then
click on the ‘new project’ icon in the header bar.  I choose GTK4 and
call the project ‘test’, then I click ‘Create’.  I am able to add a
GtkApplicationWindow with a GtkButton and change the label of that
button.  So far everything seems fine.  However, in the terminal it
still says:

--8<---------------cut here---------------start------------->8---
(.cambalache-real:7373): Gtk-WARNING **: 11:13:35.437: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.
Traceback (most recent call last):
  File "/gnu/store/ax5i4mwlwjhk3jwr3kfb41n48fczp9hv-cambalache-0.10.2/lib/python3.9/site-packages/cambalache/cmb_property_controls.py", line 562, in __load_icon_finish
    self.__model[data][6] = info.load_icon_finish(res)
gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der Bilddatei unbekannt (3)
Traceback (most recent call last):
  File "/gnu/store/ax5i4mwlwjhk3jwr3kfb41n48fczp9hv-cambalache-0.10.2/lib/python3.9/site-packages/cambalache/cmb_property_controls.py", line 562, in __load_icon_finish
    self.__model[data][6] = info.load_icon_finish(res)
gi.repository.GLib.GError: gdk-pixbuf-error-quark: Format der Bilddatei unbekannt (3)
--8<---------------cut here---------------end--------------->8---

If I use the following command to start cambalache, there’s no such
warning about loading a pixbuf from an icon theme and no traceback:

    ./pre-inst-env guix shell  cambalache glib adwaita-icon-theme gsettings-desktop-schemas librsvg <at> 2.50.7 --pure

I added the packages mentioned in the comment about using cambalache
from within guix shell.  The librsvg <at> 2.50.7 is what I get if I call
librsvg-for-system from inside the module (gnu packages gnome).

Best

-- 
Daniel




Information forwarded to guix-patches <at> gnu.org:
bug#56169; Package guix-patches. (Wed, 13 Jul 2022 19:25:02 GMT) Full text and rfc822 format available.

Message #29 received at 56169 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: 56169 <at> debbugs.gnu.org
Cc: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Subject: [PATCH v3] gnu: Add cambalache.
Date: Thu, 23 Jun 2022 16:17:23 +0200
* gnu/packages/gnome.scm (cambalache): New variable.
---
 gnu/packages/gnome.scm | 92 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 92 insertions(+)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 0ce96d41de..29e91d2bce 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -3204,6 +3204,98 @@ (define-public glade3
                                 (variable "GLADE_MODULE_SEARCH_PATH")
                                 (files '("lib/glade/modules")))))))
 
+(define-public cambalache
+  (package
+   (name "cambalache")
+   (version "0.10.2")
+   (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://gitlab.gnome.org/jpu/cambalache")
+                  (commit version)))
+            (file-name (git-file-name name version))
+            (sha256
+             (base32 "1mw5gk98zx03yal3p8slaqwhwkc9p2vnh0cssnmg6ivxsjscqhgz"))))
+   (build-system meson-build-system)
+   (arguments
+    (list
+     #:glib-or-gtk? #t
+     #:imported-modules `((guix build python-build-system)
+                          ,@%meson-build-system-modules)
+     #:modules '((guix build meson-build-system)
+                 ((guix build python-build-system) #:prefix python:)
+                 (guix build utils))
+     #:phases
+     #~(modify-phases %standard-phases
+         (add-after 'unpack 'patch-source
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "cambalache/cmb_view.py"
+               (("GLib\\.find_program_in_path\\('(.*)'\\)" all cmd)
+                (string-append "'"
+                               (search-input-file inputs
+                                                  (string-append "/bin/" cmd))
+                               "'")))))
+         (add-after 'unpack 'patch-build
+           (lambda _
+             (substitute* "postinstall.py"
+               (("update-desktop-database") "true"))))
+         (add-after 'wrap 'python-wrap (assoc-ref python:%standard-phases 'wrap))
+         (delete 'check)
+         (add-after 'install 'add-install-to-pythonpath
+           (assoc-ref python:%standard-phases 'add-install-to-pythonpath))
+         (add-after 'add-install-to-pythonpath 'pre-check
+           (lambda _
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")))
+         (add-after 'pre-check 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion ".."
+                 (invoke "python3" "-m" "pytest")))))
+         (add-after 'glib-or-gtk-wrap 'wrap-typelib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (for-each
+                (lambda (prog)
+                  (unless (wrapped-program? prog)
+                    (wrap-program prog
+                      `("GI_TYPELIB_PATH" suffix
+                        (,(string-append out "/lib/girepository-1.0")
+                         ,(getenv "GI_TYPELIB_PATH")))
+                      ;; icons and schemas
+                      `("XDG_DATA_DIRS" suffix
+                        #$(map
+                           (lambda (input)
+                             (file-append (this-package-input input) "/share"))
+                           '("adwaita-icon-theme" "hicolor-icon-theme"
+                             "gsettings-desktop-schemas")))
+                      ;; Wrapping GDK_PIXBUF_MODULE_FILE allows Cambalache to
+                      ;; load its own icons in pure environments.
+                      `("GDK_PIXBUF_MODULE_FILE" =
+                        (,(getenv "GDK_PIXBUF_MODULE_FILE"))))))
+                (find-files (string-append out "/bin")))))))))
+   (inputs (list bash-minimal
+                 adwaita-icon-theme hicolor-icon-theme
+                 gsettings-desktop-schemas
+                 gtk
+                 `(,gtk+ "bin")         ; broadwayd
+                 `(,gtk "bin")
+                 libadwaita
+                 libhandy
+                 (librsvg-for-system)
+                 python python-pygobject python-lxml
+                 webkitgtk-with-libsoup2))
+   (native-inputs (list `(,glib "bin") gobject-introspection
+                        gettext-minimal pkg-config
+                        python-pytest xorg-server-for-tests))
+   (home-page "https://gitlab.gnome.org/jpu/cambalache")
+   (synopsis "Rapid application development tool")
+   (description "Cambalache is a rapid application development (RAD) tool for
+Gtk 4 and 3 with a clear model-view-controller (MVC) design and
+data model first philosophy.")
+   (license (list license:lgpl2.1
+                  license:gpl2)))) ; tools
+
 (define-public libcroco
   (package
     (name "libcroco")
-- 
2.36.1





Reply sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
You have taken responsibility. (Sun, 31 Jul 2022 10:01:02 GMT) Full text and rfc822 format available.

Notification sent to Liliana Marie Prikler <liliana.prikler <at> gmail.com>:
bug acknowledged by developer. (Sun, 31 Jul 2022 10:01:02 GMT) Full text and rfc822 format available.

Message #34 received at 56169-done <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: 56169-done <at> debbugs.gnu.org
Cc: Daniel Meißner <daniel.meissner-i4k <at> ruhr-uni-bochum.de>
Subject: Re: [PATCH v3] gnu: Add cambalache.
Date: Sun, 31 Jul 2022 12:00:14 +0200
Am Donnerstag, dem 23.06.2022 um 16:17 +0200 schrieb Liliana Marie
Prikler:
> * gnu/packages/gnome.scm (cambalache): New variable.
Pushed some while ago, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 28 Aug 2022 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 214 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.