GNU bug report logs - #57757
[PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer

Previous Next

Package: guix-patches;

Reported by: Trevor Richards <trev <at> trevdev.ca>

Date: Mon, 12 Sep 2022 21:47:02 UTC

Severity: normal

Tags: patch

Done: Guillaume Le Vaillant <glv <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Trev <trev <at> trevdev.ca>, 57757 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 20:33:53 +0200
[Message part 1 (text/plain, inline)]
On 19-09-2022 20:22, Trev wrote:
> Maxime Devos <maximedevos <at> telenet.be> writes:
> 
>> On 19-09-2022 19:47, Trevor Richards wrote:
>>> +      (arguments
>>> +       `(#:asd-systems '(:pamixer)
>>> +         #:phases
>>> +         ,#~(modify-phases %standard-phases
>>> +             (add-after 'unpack 'patch-pamixer
>>> +               (lambda _
>>> +                 (substitute* "pamixer.lisp"
>>> +                   (("\"pamixer \"")
>>> +                    (string-append
>>> +                     "\"" #$pamixer "/bin/pamixer \""))))))))
>>
>> To support --with-input transformations, you can't do #$input, you have
>> to do #$(this-package-input "pamixer") instead -- or better, don't
>> depend on input labels, by using (search-input-file inputs
>> "bin/pamixer") instead.
>>
> 
> Thanks for the feedback. It's hard to tell when a gexp is appropriate
> and where it's not, or how to properly evaluate it all at the right
> time. The current patch builds. Is this problematic in the sense that
> it's using some reference to #$pamixer that is not actually a part of
> the build environment?

It is inappropriate in the sense that '--with-input' rewrites the 
'inputs', 'native-inputs' and 'propagated-inputs' fields, but not the 
contents of the G-exp.

> Note I had to use a quasiqote and unquote for the `gexp` to work.
> Transforming the arguments into a list so I would not have to do this
> breaks the #:asd-systems keyword value somehow.

How about:

(arguments
  (list #:asd-systems ''(:pa-mixers)
        #:phases
        #~(modify-phases [...])))

(i.e., you are removing a layer of quoting by turning the quasiquote 
into a quote, so it needs to be readded for the #:asd-systems).

> 
> When I observe the source code it's kinda all over the place when it
> comes to using gexps in some way or when not to.
> 
> I will patch this again and document a note about this but if there's
> any clarifying documentation I would happily read it. Apologies in
> advance if I have missed existing documentation.

I'm not aware of any, though I'd like to note that G-exps are new-ish 
and hence the 'all over the place' is more "guix style doesn't know how 
to transform this kind of old thing yet" than "we chose for s-exps 
instead of G-exps".

Greetings,
Maxime.
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 2 years and 243 days ago.

Previous Next


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