GNU bug report logs - #68010
[PATCH] home: services: Add home-zathura-service-type.

Previous Next

Package: guix-patches;

Reported by: lgcoelho <at> disroot.org

Date: Sun, 24 Dec 2023 18:27:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 68010 AT debbugs.gnu.org.

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#68010; Package guix-patches. (Sun, 24 Dec 2023 18:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to lgcoelho <at> disroot.org:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 24 Dec 2023 18:27:01 GMT) Full text and rfc822 format available.

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

From: lgcoelho <at> disroot.org
To: guix-patches <at> gnu.org
Subject: [PATCH] home: services: Add home-zathura-service-type.
Date: Sun, 24 Dec 2023 18:26:19 +0000
[Message part 1 (text/plain, inline)]
This service enables a declarative configuration of zathura, the 
customizable document viewer.
[Message part 2 (text/html, inline)]
[0001-home-services-Add-home-zathura-service-type.patch (text/x-diff, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#68010; Package guix-patches. (Tue, 26 Dec 2023 09:34:01 GMT) Full text and rfc822 format available.

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

From: Sergey Trofimov <sarg <at> sarg.org.ru>
To: lgcoelho <at> disroot.org
Cc: ludovic.courtes <at> inria.fr, 68010 <at> debbugs.gnu.org
Subject: Re: [bug#68010] [PATCH] home: services: Add home-zathura-service-type.
Date: Tue, 26 Dec 2023 10:33:16 +0100
lgcoelho <at> disroot.org writes:

> This service enables a declarative configuration of zathura, the 
> customizable document viewer.

I have mixed feelings about pulling 3rd-party software 
configurations in guix:
- adding it to guix increases maintenance burden: new versions 
 could add or remove config options
- it bloats guix: imagine if we add configs for every 
 user-configurable app
- such configs are not easily transferrable: if I were to use the 
 same app in non-guix env, I'd have to maintain 2 configs

Another recent example is `oci-container-configuration` which 
defines a subset of docker-cli startup arguments. The problem is 
that `docker run` command has 96 options and the configuration 
only uses a handful, lacking a way to provide the remaining ones.

I think guix should not embed config generators for user software. 
The only need I see for such generators is when there are options 
which should be the same among multiple applications (e.g. color 
schemes or shared directories). For such usecase guix should 
provide better text manipulation tools which home owners could use 
to parameterise configs.




Information forwarded to guix-patches <at> gnu.org:
bug#68010; Package guix-patches. (Tue, 26 Dec 2023 12:12:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: 68010 <at> debbugs.gnu.org
Subject: Re: [bug#68010] [PATCH] home: services: Add home-zathura-service-type.
Date: Tue, 26 Dec 2023 15:11:25 +0300
[Message part 1 (text/plain, inline)]
Hi Sergey,

Sergey Trofimov <sarg <at> sarg.org.ru> writes:

> I have mixed feelings about pulling 3rd-party software configurations in guix:
> - adding it to guix increases maintenance burden: new versions   could add or
>  remove config options
> - it bloats guix: imagine if we add configs for every   user-configurable app
> - such configs are not easily transferrable: if I were to use the   same app
>  in non-guix env, I'd have to maintain 2 configs
>
> Another recent example is `oci-container-configuration` which defines a subset
> of docker-cli startup arguments. The problem is that `docker run` command has
> 96 options and the configuration only uses a handful, lacking a way to provide
> the remaining ones.
>
> I think guix should not embed config generators for user software. The only
> need I see for such generators is when there are options which should be the
> same among multiple applications (e.g. color schemes or shared
> directories). For such usecase guix should provide better text manipulation
> tools which home owners could use to parameterise configs.

It's a bit too off-topic to dive into general configurations in Guix
within the context of the current patch series and should probably be
discussed in a ‘guix-devel’ mailing list or ‘#guix’ IRC channel.


Regards,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#68010; Package guix-patches. (Mon, 08 Jan 2024 08:48:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: Sergey Trofimov <sarg <at> sarg.org.ru>
Cc: lgcoelho <at> disroot.org, 68010 <at> debbugs.gnu.org
Subject: Re: [bug#68010] [PATCH] home: services: Add home-zathura-service-type.
Date: Mon, 08 Jan 2024 09:46:50 +0100
Hello,

Sergey Trofimov <sarg <at> sarg.org.ru> skribis:

> lgcoelho <at> disroot.org writes:
>
>> This service enables a declarative configuration of zathura, the
>> customizable document viewer.
>
> I have mixed feelings about pulling 3rd-party software configurations
> in guix:
> - adding it to guix increases maintenance burden: new versions   could
>  add or remove config options
> - it bloats guix: imagine if we add configs for every
>   user-configurable app
> - such configs are not easily transferrable: if I were to use the
>   same app in non-guix env, I'd have to maintain 2 configs
>
> Another recent example is `oci-container-configuration` which defines
> a subset of docker-cli startup arguments. The problem is that `docker
> run` command has 96 options and the configuration only uses a handful,
> lacking a way to provide the remaining ones.
>
> I think guix should not embed config generators for user software. The
> only need I see for such generators is when there are options which
> should be the same among multiple applications (e.g. color schemes or
> shared directories). For such usecase guix should provide better text
> manipulation tools which home owners could use to parameterise
> configs.

I guess it’s a tradeoff.  The usual approach for System/Home services
has been to provide “bindings” (a record type) for the config, *plus* an
“escape hatch” (letting users pass raw config as a string).

But you’re right, the expected maintenance burden should be taken into
account.  For well-established software and config formats such as Git,
it’s probably okay to have bindings; for things that are more
recent/changing, it’s less obvious.  Also, we currently don’t have tests
for Home services, except for those mapped from System services, which
means breakage isn’t automatically detected.

I don’t know whether Zathura falls in the “okay” category or rather in
the “let’s do write bindings” one.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#68010; Package guix-patches. (Tue, 23 Jan 2024 13:10:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: lgcoelho <at> disroot.org
Cc: 68010 <at> debbugs.gnu.org
Subject: Re: [bug#68010] [PATCH] home: services: Add home-zathura-service-type.
Date: Tue, 23 Jan 2024 16:09:09 +0300
[Message part 1 (text/plain, inline)]
Hello, Luis.

Apologies for delay.

Could you send a new patch with applied following suggestions, please?

lgcoelho <at> disroot.org writes:

> This service enables a declarative configuration of zathura, the customizable
> document viewer.
>
> commit 76954ed7dc32ac86ee22566cc03cadc5f9fc1864
> Author: Luis Guilherme Coelho <lgcoelho <at> disroot.org>
> Date:   Sun Dec 24 15:16:43 2023 -0300
>
>     home: services: Add home-zathura-service-type

The commit message should look like:
--8<---------------cut here---------------start------------->8---
home: services: Add zathura service.

* gnu/home/services/zathura.scm: New file.
* doc/guix.texi (SPECIFY SECTION HERE): Document this.
--8<---------------cut here---------------end--------------->8---

> diff --git a/gnu/home/services/zathura.scm b/gnu/home/services/zathura.scm
> new file mode 100644
> index 0000000000..0695ce1614
> --- /dev/null
> +++ b/gnu/home/services/zathura.scm

[…]

> +(define home-zathura-service-type
> +  (service-type
> +   (name 'zathura-service)
> +   (extensions
> +    (list (service-extension
> +            home-xdg-configuration-files-service-type
> +            zathura-xdg-configuration-file-service)))
> +   (compose identity)
> +   (extend home-zathura-extensions)
> +   (default-value (home-zathura-configuration))
> +   (description "Set ~/.config/zathura.conf")))

Description should mention that the service configures the Zathura PDF
viewer, e.g.:

Configure the Zathura PDF viewer by providing a
@file{~/.config/zathura.conf} file.

> +(define (generate-doc)
> +  (configuration->documentation 'home-zathura-configuration))

The service documentation should be added to doc/guix.texi file.

See ZNC home service as an example.

Fields documentation could be generated with:
--8<---------------cut here---------------start------------->8---
~/src/git.savannah.gnu.org/git/guix$ ./pre-inst-env guix repl
GNU Guile 3.0.9
Copyright (C) 1995-2023 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,m(gnu home services zathura)
scheme@(gnu home services zathura)> (generate-doc)
--8<---------------cut here---------------end--------------->8---


Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#68010; Package guix-patches. (Tue, 23 Jan 2024 13:14:02 GMT) Full text and rfc822 format available.

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

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: lgcoelho <at> disroot.org
Cc: 68010 <at> debbugs.gnu.org
Subject: Re: [bug#68010] [PATCH] home: services: Add home-zathura-service-type.
Date: Tue, 23 Jan 2024 16:13:13 +0300
[Message part 1 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:

> Could you send a new patch with applied following suggestions, please?

Also, the gnu/local.mk file should include gnu/home/services/zathura.scm
and it should be noted in the Git commit message accordingly, see
‘git log gnu/local.mk’ for an example message.
[signature.asc (application/pgp-signature, inline)]

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

Previous Next


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