unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Daniel Meißner via Bug reports for GNU Guix" <bug-guix@gnu.org>
To: Alexander Asteroth <alexander.asteroth@h-brs.de>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Maxime Devos" <maximedevos@telenet.be>,
	51968@debbugs.gnu.org
Subject: bug#51968: Missing dependency for Xournal++
Date: Tue, 21 Dec 2021 12:43:45 +0100	[thread overview]
Message-ID: <87wnjy18um.fsf@ruhr-uni-bochum.de> (raw)
In-Reply-To: <87ee66e3wp.fsf@h-brs.de>

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




  parent reply	other threads:[~2021-12-21 11:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2021-12-21 22:46             ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnjy18um.fsf@ruhr-uni-bochum.de \
    --to=bug-guix@gnu.org \
    --cc=51968@debbugs.gnu.org \
    --cc=alexander.asteroth@h-brs.de \
    --cc=daniel.meissner-i4k@ruhr-uni-bochum.de \
    --cc=ludo@gnu.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).