unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#51968: Missing dependency for Xournal++
@ 2021-11-19  9:19 Daniel Meißner via Bug reports for GNU Guix
  2021-12-10 13:32 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Meißner via Bug reports for GNU Guix @ 2021-11-19  9:19 UTC (permalink / raw)
  To: 51968; +Cc: Alexander Asteroth

Hi Guix,

there is a problem with the package xournalpp on Guix master.  To
reproduce run:

--8<---------------cut here---------------start------------->8---
$ guix shell --pure xournalpp -- xournalpp
** Message: 10:08:54.258: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
** Message: 10:08:54.289: Plugin "MigrateFontSizes" UI initialized
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Crashed with signal 6

** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Wrote crash log to: /home/daniel/.cache/xournalpp/errorlogs/errorlog.20211119-100854.log

** (xournalpp:2068): WARNING **: 10:08:54.478: Trying to emergency save the current open document?

** (xournalpp:2068): WARNING **: 10:08:54.478: Successfully saved document to "/home/daniel/.config/xournalpp/emergencysave.xopp"
--8<---------------cut here---------------end--------------->8---

Alexander Asteroth, who discovered the problem, wrote to help-guix:
> I found the reason. Xournal++ needs gnome-icon-theme to be installed
> as well. So it should probably go into the dependencies of the
> package.

This problem is easily missed when installing Xournal++ on a Guix system
with Gnome as DE.

Best
Daniel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-11-19  9:19 bug#51968: Missing dependency for Xournal++ Daniel Meißner via Bug reports for GNU Guix
@ 2021-12-10 13:32 ` Ludovic Courtès
  2021-12-10 13:54   ` Daniel Meißner via Bug reports for GNU Guix
  2021-12-17 10:06   ` Daniel Meißner via Bug reports for GNU Guix
  0 siblings, 2 replies; 9+ messages in thread
From: Ludovic Courtès @ 2021-12-10 13:32 UTC (permalink / raw)
  To: Daniel Meißner; +Cc: 51968, Alexander Asteroth

Hi Daniel,

Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:

> there is a problem with the package xournalpp on Guix master.  To
> reproduce run:
>
> $ guix shell --pure xournalpp -- xournalpp
> ** Message: 10:08:54.258: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
> ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
> ** Message: 10:08:54.289: Plugin "MigrateFontSizes" UI initialized
> **
> Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
> Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
>
> ** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Crashed with signal 6
>
> ** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Wrote crash log to: /home/daniel/.cache/xournalpp/errorlogs/errorlog.20211119-100854.log
>
> ** (xournalpp:2068): WARNING **: 10:08:54.478: Trying to emergency save the current open document?
>
> ** (xournalpp:2068): WARNING **: 10:08:54.478: Successfully saved document to "/home/daniel/.config/xournalpp/emergencysave.xopp"
>
> Alexander Asteroth, who discovered the problem, wrote to help-guix:
>> I found the reason. Xournal++ needs gnome-icon-theme to be installed
>> as well. So it should probably go into the dependencies of the
>> package.

How should this be addressed?  Adding ‘gnome-icon-theme’ as a propagated
input would be quite unusual, but maybe it’s become necessary?

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-10 13:32 ` Ludovic Courtès
@ 2021-12-10 13:54   ` Daniel Meißner via Bug reports for GNU Guix
  2021-12-17 10:06   ` Daniel Meißner via Bug reports for GNU Guix
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Meißner via Bug reports for GNU Guix @ 2021-12-10 13:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 51968, Alexander Asteroth

Hi Ludo,

Ludovic Courtès writes:
> Daniel Meißner skribis:
>
>> there is a problem with the package xournalpp on Guix master.  To
>> reproduce run:
>>
>> $ guix shell --pure xournalpp -- xournalpp
>> [...]
> How should this be addressed?  Adding ‘gnome-icon-theme’ as a propagated
> input would be quite unusual, but maybe it’s become necessary?

In fact, I think it should be adwaita-icon-theme.  Anyways, I am not
familiar with how GTK loads its icons but maybe we could patch the
sources to look for the icon in the right places so that we can just add
it as an input?

Best
Daniel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-10 13:32 ` Ludovic Courtès
  2021-12-10 13:54   ` Daniel Meißner via Bug reports for GNU Guix
@ 2021-12-17 10:06   ` Daniel Meißner via Bug reports for GNU Guix
  2021-12-17 16:14     ` Alexander Asteroth
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Meißner via Bug reports for GNU Guix @ 2021-12-17 10:06 UTC (permalink / raw)
  To: Ludovic Courtès, Alexander Asteroth; +Cc: 51968

Hi Alexander, hi Ludo’,

Ludovic Courtès writes:
> Hi Daniel,
>
> Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:
>
>> there is a problem with the package xournalpp on Guix master.  To
>> reproduce run:
>>
>> $ guix shell --pure xournalpp -- xournalpp

[...]

> How should this be addressed?  Adding ‘gnome-icon-theme’ as a
> propagated input would be quite unusual, but maybe it’s become
> necessary?

I have done some more analysis.  First of all, I was wrong in pointing
out it has to be ‘adwaita-icon-theme’ for it to work, ‘gnome-icon-theme’
does also work.  Of course, you then get a different ‘image-missing’
icon.  However, let me elaborate a bit:

The following command tries to invoke xournalpp in a pure and
environment.  It crashes because it cannot find ‘image-missing.png’.  It
tries to load this icon in the first place because it cannot load its
own toolbar icons.

#+begin_src bash
  guix shell --pure xournalpp -- xournalpp
#+end_src

However, when run from within Gnome it works without problems and the
toolbar icons show up.  Running the following prevents the crash but
most of the toolbar icons now show the ‘image-missing’ icon:

#+begin_src bash
  guix shell --pure xournalpp gnome-icon-theme
  export XDG_DATA_DIRS=$GUIX_ENVIRONMENT/share
  xournalpp
#+end_src

Depending on whether one uses ‘gnome-icon-theme’ or ‘adwaita-icon-theme’
different icons for ‘image-missing’ are used.

It seems to me that evince also does not find all of its icons.
However, it does not crash because it has ‘adwaita-icon-theme’ as one of
its inputs (although it is just an input, not a propagated input).  The
missing icon is the ‘view-sidebar-symbolic-ltr’ and is complained about
after opening some PDF.

#+begin_src bash
  guix shell --pure evince -- evince
#+end_src

Also in this case when run from Gnome the sidebar icon is correctly
displayed.

So in order to address the crash it seems natural to add either
‘gnome-icon-theme’ or ’adwaita-icon-theme’ to the list of inputs.  For
example, the following package definition yields a “working” Xournalpp
in the sense that it does not crash.

#+begin_src scheme
(use-modules (guix packages)
             (gnu packages pdf)
             (gnu packages gnome))

(package/inherit xournalpp
  (inputs (modify-inputs (package-inputs xournalpp)
            (append adwaita-icon-theme))))
#+end_src

Put the above in a file named ‘xournalpp-fix.scm’ and then run:

#+begin_src bash
guix shell --pure -f xournalpp-fix.scm -- xournalpp
#+end_src

Xournalpp does not crash, however, the correct toolbar icons are still
missing and this seems to be the actual problem.  Any ideas where to
look for the problem?  I have not tried to run Xournalpp in an XFCE
environment to see if the toolbar icons are missing there, too.  But
maybe Alexander has, since he discovered the problem in the first place.
As I am using Gnome, I have never run into this issue before despite
having been using Xournalpp under Guix for a while now.

Since evince also shows this behaviour in an isolated environment:
Might there be a general underlying problem?

Best
Daniel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-17 10:06   ` Daniel Meißner via Bug reports for GNU Guix
@ 2021-12-17 16:14     ` Alexander Asteroth
       [not found]       ` <875yrj5qxf.fsf@ruhr-uni-bochum.de>
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Asteroth @ 2021-12-17 16:14 UTC (permalink / raw)
  To: Daniel Meißner; +Cc: 51968

[-- Attachment #1: Type: text/plain, Size: 4220 bytes --]

Hi Daniel, Hi Ludovic,

I can reproduce the missing icons issue by running 

> guix shell --pure -f xournalpp-fix.scm -- xournalpp

as suggested below. Wondering why the icons are not missing when I run
xournalpp in my environment I discovered that

> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp

resolves this problem.

Looking at your xournalpp-fix.scm file I wondered what the function
modify-input exactly does (and how to add gtk+ to the append clause). I
don't find neither documentation in the manuals nor code for it in a
guix checkout (when I do a recursive grep in the source for guix or gnu
modules the result is empty).

Cheers,
Alex

On Fri, Dec 17 2021, 11:06:02, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:

> Hi Alexander, hi Ludo’,
>
> Ludovic Courtès writes:
>> Hi Daniel,
>>
>> Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:
>>
>>> there is a problem with the package xournalpp on Guix master.  To
>>> reproduce run:
>>>
>>> $ guix shell --pure xournalpp -- xournalpp
>
> [...]
>
>> How should this be addressed?  Adding ‘gnome-icon-theme’ as a
>> propagated input would be quite unusual, but maybe it’s become
>> necessary?
>
> I have done some more analysis.  First of all, I was wrong in pointing
> out it has to be ‘adwaita-icon-theme’ for it to work, ‘gnome-icon-theme’
> does also work.  Of course, you then get a different ‘image-missing’
> icon.  However, let me elaborate a bit:
>
> The following command tries to invoke xournalpp in a pure and
> environment.  It crashes because it cannot find ‘image-missing.png’.  It
> tries to load this icon in the first place because it cannot load its
> own toolbar icons.
>
> #+begin_src bash
>   guix shell --pure xournalpp -- xournalpp
> #+end_src
>
>
> However, when run from within Gnome it works without problems and the
> toolbar icons show up.  Running the following prevents the crash but
> most of the toolbar icons now show the ‘image-missing’ icon:
>
> #+begin_src bash
>   guix shell --pure xournalpp gnome-icon-theme
>   export XDG_DATA_DIRS=$GUIX_ENVIRONMENT/share
>   xournalpp
> #+end_src
>
>
> Depending on whether one uses ‘gnome-icon-theme’ or ‘adwaita-icon-theme’
> different icons for ‘image-missing’ are used.
>
> It seems to me that evince also does not find all of its icons.
> However, it does not crash because it has ‘adwaita-icon-theme’ as one of
> its inputs (although it is just an input, not a propagated input).  The
> missing icon is the ‘view-sidebar-symbolic-ltr’ and is complained about
> after opening some PDF.
>
> #+begin_src bash
>   guix shell --pure evince -- evince
> #+end_src
>
>
> Also in this case when run from Gnome the sidebar icon is correctly
> displayed.
>
> So in order to address the crash it seems natural to add either
> ‘gnome-icon-theme’ or ’adwaita-icon-theme’ to the list of inputs.  For
> example, the following package definition yields a “working” Xournalpp
> in the sense that it does not crash.
>
> #+begin_src scheme
> (use-modules (guix packages)
>              (gnu packages pdf)
>              (gnu packages gnome))
>
> (package/inherit xournalpp
>   (inputs (modify-inputs (package-inputs xournalpp)
>             (append adwaita-icon-theme))))
> #+end_src
>
>
> Put the above in a file named ‘xournalpp-fix.scm’ and then run:
>
> #+begin_src bash
> guix shell --pure -f xournalpp-fix.scm -- xournalpp
> #+end_src
>
> Xournalpp does not crash, however, the correct toolbar icons are still
> missing and this seems to be the actual problem.  Any ideas where to
> look for the problem?  I have not tried to run Xournalpp in an XFCE
> environment to see if the toolbar icons are missing there, too.  But
> maybe Alexander has, since he discovered the problem in the first place.
> As I am using Gnome, I have never run into this issue before despite
> having been using Xournalpp under Guix for a while now.
>
> Since evince also shows this behaviour in an isolated environment:
> Might there be a general underlying problem?
>
> Best
> Daniel


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 524 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
       [not found]       ` <875yrj5qxf.fsf@ruhr-uni-bochum.de>
@ 2021-12-21  8:45         ` Alexander Asteroth
  2021-12-21 10:51           ` Maxime Devos
  2021-12-21 11:43           ` Daniel Meißner via Bug reports for GNU Guix
  0 siblings, 2 replies; 9+ messages in thread
From: Alexander Asteroth @ 2021-12-21  8:45 UTC (permalink / raw)
  To: Daniel Meißner; +Cc: 51968

Hi Daniel,

On Mon, Dec 20 2021, 14:47:24, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:
>> I can reproduce the missing icons issue by running 
>>
>>> guix shell --pure -f xournalpp-fix.scm -- xournalpp
>>
>> as suggested below. Wondering why the icons are not missing when I run
>> xournalpp in my environment I discovered that
>>
>>> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp
>>
>> resolves this problem.
>
> This is weird since gtk+ already is an input to xournalpp (despite not a
> propagated one).  What desktop environment are you using?

That is *really* strange, is it? I'm using no desktop environment. Just
EXWM as window manager.

>
>> Looking at your xournalpp-fix.scm file I wondered what the function
>> modify-input exactly does (and how to add gtk+ to the append
>> clause). I don't find neither documentation in the manuals nor code
>> for it in a guix checkout (when I do a recursive grep in the source
>> for guix or gnu modules the result is empty).
>
> This ‘modify-input’ form is actually a macro and it is documented in the
> latest version of the manual [1].  This macro is part of a big surface
> level syntax change for packages which arrived with the
> core-updates-frozen merge. See [2] for a nice blog post.

In the meantime I found that as well. But the documentation (from my
perspective) is unfortunately incomplete. It neither specifies the full
semantics (without looking into the macro-code) nor does it tell me,
what kind of clauses I can put e.g. into (modify-input ...). How is
(append ...) translated? The web document links to the list append
function which it might somehow translate to but that is not documented
either (at least I dont find it).

This seems to be a general problem with the documentation to me (that
it doesn't fully document neither syntax nor semantics). Others have
problems using guile (which I don't have)...

Cheers,

Alex

> As I have
> mentioned, gtk+ is already an input for xournalpp.  If it were not, you
> could add it using:
>
> (modify-inputs (package-inputs xournalpp)
>   (append adwaita-icon-theme gtk+))
>
> Best,
> Daniel
>
> 1: https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#index-modify_002dinputs
> 2: https://guix.gnu.org/de/blog/2021/the-big-change/





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-21  8:45         ` Alexander Asteroth
@ 2021-12-21 10:51           ` Maxime Devos
  2021-12-21 11:43           ` Daniel Meißner via Bug reports for GNU Guix
  1 sibling, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2021-12-21 10:51 UTC (permalink / raw)
  To: Alexander Asteroth, Daniel Meißner; +Cc: 51968

Hi,

Alexander Asteroth schreef op di 21-12-2021 om 09:45 [+0100]:
> [...]
> In the meantime I found that as well. But the documentation (from my
> perspective) is unfortunately incomplete. It neither specifies the
> full
> semantics (without looking into the macro-code)

‘Modify the given package inputs, as returned by package-inputs & co.,
according to the given clauses. The example below removes the GMP and
ACL inputs of Coreutils and _adds libcap to the back of the input
list_:

(modify-inputs (package-inputs coreutils)
  (delete "gmp" "acl")
  (append libcap))’

(Emphasis mine.) Seems like the behaviour of 'append' is specified?
Except that it isn't explicitely stated there can be multiple
arguments, although this seems implied by the 'delete' example.

>  nor does it tell me,
> what kind of clauses I can put e.g. into (modify-input ...).

The manual documnets ‘delete’, ’append’ and ‘replace’, and ends with
‘the last type of clause is prepend’, no?

>  How is
> (append ...) translated? The web document links to the list append
> function which it might somehow translate to but that is not
> documented
> either (at least I dont find it).

The ‘append’ procedure is from Guile, not Guix.
Also, it doesn't link to the 'append' procedure?
--- nevermind, the 'append' in the code example does link to the Guile
manual. Seems like a bug, because 'append' accepts lists, not elements
of lists. Likewise for 'delete'.

About how ‘(append ...)’ is translated:

‘The example below [...] adds libcap to the back of the input list’.

I don't see how the documentation could be more complete,
unless you're looking for a less informal description of the syntax,
e.g. as in the documentation for 'match' or 'define-record-type' in
Guile.

Greetings,
Maxime

>
https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#index-modify_002dinputs





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-21  8:45         ` Alexander Asteroth
  2021-12-21 10:51           ` Maxime Devos
@ 2021-12-21 11:43           ` Daniel Meißner via Bug reports for GNU Guix
  2021-12-21 22:46             ` Maxime Devos
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Meißner via Bug reports for GNU Guix @ 2021-12-21 11:43 UTC (permalink / raw)
  To: Alexander Asteroth; +Cc: Ludovic Courtès, Maxime Devos, 51968

Alexander Asteroth writes:

> On Mon, Dec 20 2021, 14:47:24, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:
>>> I can reproduce the missing icons issue by running 
>>>
>>>> guix shell --pure -f xournalpp-fix.scm -- xournalpp
>>>
>>> as suggested below. Wondering why the icons are not missing when I run
>>> xournalpp in my environment I discovered that
>>>
>>>> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp
>>>
>>> resolves this problem.
>>
>> This is weird since gtk+ already is an input to xournalpp (despite not a
>> propagated one).  What desktop environment are you using?
>
> That is *really* strange, is it? I'm using no desktop environment. Just
> EXWM as window manager.
>

I can confirm that adding gtk+ to the profile makes Xournal++ find its
icons.  I did a comparison of the environment variables of the two ‘guix
shell’ invocations and here’s the thing:

--8<---------------cut here---------------start------------->8---
$ guix shell --pure -f xournalpp-fix.scm -- /usr/bin/env
LOGNAME=daniel
XAUTHORITY=/run/user/1000/gdm/Xauthority
HOME=/home/daniel
TERM=dumb
USER=daniel
DISPLAY=:1
PATH=/gnu/store/jrhzgh2pjzq2jbvcp4jgy7zznprkigh4-profile/bin
GUIX_ENVIRONMENT=/gnu/store/jrhzgh2pjzq2jbvcp4jgy7zznprkigh4-profile
$ guix shell --pure gtk+ -f xournalpp-fix.scm -- /usr/bin/env
LOGNAME=daniel
XAUTHORITY=/run/user/1000/gdm/Xauthority
HOME=/home/daniel
TERM=dumb
USER=daniel
DISPLAY=:1
PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/bin:/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/sbin
GUIX_GTK3_PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/lib/gtk-3.0
XDG_DATA_DIRS=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/share
XCURSOR_PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/share/icons
GDK_PIXBUF_MODULE_FILE=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GUIX_ENVIRONMENT=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile
--8<---------------cut here---------------end--------------->8---

As you can see: among others the XDG_DATA_DIRS is set which causes
Xournal++ to find its icons.  Plus the GDK_PIXBUF_MODULE_FILE also
resolves the problem that Xournal++ cannot recognize the file format of
its application icon ‘pixmaps/com.github.xournalpp.xournalpp.svg’ which
also happens with ‘guix shell --pure -f xournalpp-fix.scm -- xournalpp’.

These missing environment variables are probably because the package
definition does not use glib-or-gtk-build-system but cmake-build-system.
WDYT?  Maxime, can you confirm this and how should we fix this?

>> This ‘modify-input’ form is actually a macro and it is documented in the
>> latest version of the manual [1].  This macro is part of a big surface
>> level syntax change for packages which arrived with the
>> core-updates-frozen merge. See [2] for a nice blog post.
>
> In the meantime I found that as well. But the documentation (from my
> perspective) is unfortunately incomplete. It neither specifies the full
> semantics (without looking into the macro-code) nor does it tell me,
> what kind of clauses I can put e.g. into (modify-input ...). How is
> (append ...) translated? The web document links to the list append
> function which it might somehow translate to but that is not documented
> either (at least I dont find it).

As Maxime writes, the examples show how to use the syntax.  However,
honestly, I looked up the definition of ‘modify-inputs’ in (guix
packages) because I felt a bit like guessing which is probably what you
were feeling while reading the manual.  It could indeed state more
clearly that each of CLAUSES can be one of the following forms:

(append names ...)
(prepend names ...)
(delete names ...)
(replace name replacement)

Especially because ‘replace’ breaks the pattern.  Also it would be nice
to mention that the names can be specified be either the package name as
a string or a package object.

Best
Daniel




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#51968: Missing dependency for Xournal++
  2021-12-21 11:43           ` Daniel Meißner via Bug reports for GNU Guix
@ 2021-12-21 22:46             ` Maxime Devos
  0 siblings, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2021-12-21 22:46 UTC (permalink / raw)
  To: Daniel Meißner, Alexander Asteroth; +Cc: 51968

Daniel Meißner schreef op di 21-12-2021 om 12:43 [+0100]:
> As you can see: among others the XDG_DATA_DIRS is set which causes
> Xournal++ to find its icons.  Plus the GDK_PIXBUF_MODULE_FILE also
> resolves the problem that Xournal++ cannot recognize the file format of
> its application icon ‘pixmaps/com.github.xournalpp.xournalpp.svg’ which
> also happens with ‘guix shell --pure -f xournalpp-fix.scm -- xournalpp’.
> 
> These missing environment variables are probably because the package
> definition does not use glib-or-gtk-build-system but cmake-build-system.
> WDYT?  Maxime, can you confirm this and how should we fix this?

Now I read these two paragraphs, I think what was going wrong with the
modify-inputs adding gtk+: that modify-inputs only adds gtk+ to the
inputs, it doesn't cause gtk+ to be added to the profile whenever
xournalpp is added to the profile. For the latter, you need
propagated-inputs, but that's to be avoided due to $REASONS
(propagation conflicts, profile building performance, profile
pollution, ...).

Anyway, a wrap-program setting XDG_DATA_DIRS (and
GDK_PIXBUF_MODULE_FILE?) appropriately might be sufficient here (see
e.g. the package definition of gedit).

Adding XDG_DATA_DIRS as a native-search-path to xournalpp might work as
well, but it's a rather generic search path so I'd try to avoid that.

Greetings,
Maxime.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-12-21 22:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19  9:19 bug#51968: Missing dependency for Xournal++ Daniel Meißner via Bug reports for GNU Guix
2021-12-10 13:32 ` Ludovic Courtès
2021-12-10 13:54   ` Daniel Meißner via Bug reports for GNU Guix
2021-12-17 10:06   ` Daniel Meißner via Bug reports for GNU Guix
2021-12-17 16:14     ` Alexander Asteroth
     [not found]       ` <875yrj5qxf.fsf@ruhr-uni-bochum.de>
2021-12-21  8:45         ` Alexander Asteroth
2021-12-21 10:51           ` Maxime Devos
2021-12-21 11:43           ` Daniel Meißner via Bug reports for GNU Guix
2021-12-21 22:46             ` Maxime Devos

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).