bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51968: Missing dependency for Xournal++


From: Daniel Meißner
Subject: bug#51968: Missing dependency for Xournal++
Date: Tue, 21 Dec 2021 12:43:45 +0100

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]