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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57757 in the body.
You can then email your comments to 57757 AT debbugs.gnu.org in the normal way.

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#57757; Package guix-patches. (Mon, 12 Sep 2022 21:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Trevor Richards <trev <at> trevdev.ca>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 12 Sep 2022 21:47:02 GMT) Full text and rfc822 format available.

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

From: Trevor Richards <trev <at> trevdev.ca>
To: guix-patches <at> gnu.org
Subject: [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
Date: Mon, 12 Sep 2022 14:41:25 -0700
Hello,

This patch adds sbcl-stumpwm-pamixer which provides convenient commands
for manipulating your volume levels/sinks within stumpwm.

---
 gnu/packages/wm.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 451dfce516..3f2258db52 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1986,6 +1986,31 @@ (define-public stumpish
     (description "This package provides a StumpWM interactive shell.")
     (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
 
+(define-public sbcl-stumpwm-pamixer
+  (let ((commit "aa820533c80ea1af5a0e107cea25eaf34e69dc24")
+        (revision "1"))
+    (package
+      (name "sbcl-stumpwm-pamixer")
+      (version (git-version "0.1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Junker/stumpwm-pamixer.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
+      (inputs `(("stumpwm" ,stumpwm "lib")))
+      (propagated-inputs (list pamixer))
+      (build-system asdf-build-system/sbcl)
+      (arguments '(#:asd-systems '(:pamixer)))
+      (home-page "https://github.com/Junker/stumpwm-pamixer")
+      (synopsis "StumpWM Pamixer Module")
+      (description "Minimalistic Pulseaudio volume and microphone control
+module for StumpWM.")
+      (license license:gpl3))))
+
 (define-public sbcl-stumpwm+slynk
   (deprecated-package "sbcl-stumpwm-with-slynk" stumpwm+slynk))
 
-- 
2.37.3




Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Thu, 15 Sep 2022 20:35:01 GMT) Full text and rfc822 format available.

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

From: Trevor Richards <trev <at> trevdev.ca>
To: 57757 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 12 Sep 2022 14:41:25 -0700
---
 gnu/packages/wm.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 451dfce516..3f2258db52 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1986,6 +1986,31 @@ (define-public stumpish
     (description "This package provides a StumpWM interactive shell.")
     (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
 
+(define-public sbcl-stumpwm-pamixer
+  (let ((commit "aa820533c80ea1af5a0e107cea25eaf34e69dc24")
+        (revision "1"))
+    (package
+      (name "sbcl-stumpwm-pamixer")
+      (version (git-version "0.1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Junker/stumpwm-pamixer.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
+      (inputs `(("stumpwm" ,stumpwm "lib")))
+      (propagated-inputs (list pamixer))
+      (build-system asdf-build-system/sbcl)
+      (arguments '(#:asd-systems '(:pamixer)))
+      (home-page "https://github.com/Junker/stumpwm-pamixer")
+      (synopsis "StumpWM Pamixer Module")
+      (description "Minimalistic Pulseaudio volume and microphone control
+module for StumpWM.")
+      (license license:gpl3))))
+
 (define-public sbcl-stumpwm+slynk
   (deprecated-package "sbcl-stumpwm-with-slynk" stumpwm+slynk))
 
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Fri, 16 Sep 2022 08:02:01 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Trevor Richards <trev <at> trevdev.ca>
Cc: 57757 <at> debbugs.gnu.org
Subject: Re: [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Fri, 16 Sep 2022 07:50:18 +0000
[Message part 1 (text/plain, inline)]
Trevor Richards <trev <at> trevdev.ca> skribis:

> ---
>  gnu/packages/wm.scm | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 451dfce516..3f2258db52 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -1986,6 +1986,31 @@ (define-public stumpish
>      (description "This package provides a StumpWM interactive shell.")
>      (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
>  
> +(define-public sbcl-stumpwm-pamixer
> [...]
> +      (inputs `(("stumpwm" ,stumpwm "lib")))
> +      (propagated-inputs (list pamixer))
> [...]

Hi.

Instead of propagating pamixer, it would be better to put pamixer in
'inputs' and fix the path to the pamixer program in the 'run' function
in "pamixer.lisp". For example, take a look at the 'fix-paths' phase of
the sbcl-trivial-clipboard package.

Could you send an updated patch?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Fri, 16 Sep 2022 09:08:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Trevor Richards <trev <at> trevdev.ca>, 57757 <at> debbugs.gnu.org
Subject: Re: [bug#57757] [PATCH] * gnu/packages/wm.scm: Add
 sbcl-stumpwm-pamixer
Date: Fri, 16 Sep 2022 11:07:36 +0200
[Message part 1 (text/plain, inline)]

On 12-09-2022 23:41, Trevor Richards wrote:
> +      (inputs `(("stumpwm" ,stumpwm "lib")))

Try running "./pre-inst-env guix style --input-simplification=always 
sbcl-stumpwm-pamixer", it will have a proposed change.

> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/Junker/stumpwm-pamixer.git")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32 "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))

IIUC, "guix lint" will have a lint message about that URI, asking you to 
drop the .git suffix.  '(guix)Submitting Patches' asks to run 
'./pre-inst-env guix lint sbcl-stumpwm-pamixer'.

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 14:33:02 GMT) Full text and rfc822 format available.

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

From: Trev <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: Re: [bug#57757] [PATCH] * gnu/packages/wm.scm: Add
 sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 07:31:57 -0700
Maxime Devos <maximedevos <at> telenet.be> writes:

> On 12-09-2022 23:41, Trevor Richards wrote:
>> +      (inputs `(("stumpwm" ,stumpwm "lib")))
>
> Try running "./pre-inst-env guix style --input-simplification=always 
> sbcl-stumpwm-pamixer", it will have a proposed change.
>

In my case it does not. I updated the label to "stumpwm:lib" in the
hopes that I could patch it the way we like it.

>> +      (source
>> +       (origin
>> +         (method git-fetch)
>> +         (uri (git-reference
>> +               (url "https://github.com/Junker/stumpwm-pamixer.git")
>> +               (commit commit)))
>> +         (file-name (git-file-name name version))
>> +         (sha256
>> +          (base32 "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
>
> IIUC, "guix lint" will have a lint message about that URI, asking you to 
> drop the .git suffix.  '(guix)Submitting Patches' asks to run 
> './pre-inst-env guix lint sbcl-stumpwm-pamixer'.
>

No problem, I dropped the .git

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206




Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 14:39:02 GMT) Full text and rfc822 format available.

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

From: Trevor Richards <trev <at> trevdev.ca>
To: 57757 <at> debbugs.gnu.org
Cc: Guillaume Le Vaillant <glv <at> posteo.net>,
 Maxime Devos <maximedevos <at> telenet.be>
Subject: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 12 Sep 2022 14:41:25 -0700
---
 gnu/packages/wm.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 451dfce516..7e87079b22 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1986,6 +1986,40 @@ (define-public stumpish
     (description "This package provides a StumpWM interactive shell.")
     (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
 
+(define-public sbcl-stumpwm-pamixer
+  (let ((commit "aa820533c80ea1af5a0e107cea25eaf34e69dc24")
+        (revision "1"))
+    (package
+      (name "sbcl-stumpwm-pamixer")
+      (version (git-version "0.1.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Junker/stumpwm-pamixer")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
+      (inputs `(("stumpwm:lib" ,stumpwm "lib")
+                ("pamixer", pamixer)))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:asd-systems '(:pamixer)
+         #:phases
+         ,#~(modify-phases %standard-phases
+             (add-after 'unpack 'patch-pamixer
+               (lambda _
+                 (substitute* "pamixer.lisp"
+                   (("\"pamixer \"")
+                    (string-append
+                     "\"" #$pamixer "/bin/pamixer \""))))))))
+      (home-page "https://github.com/Junker/stumpwm-pamixer")
+      (synopsis "StumpWM Pamixer Module")
+      (description "Minimalistic Pulseaudio volume and microphone control
+module for StumpWM.")
+      (license license:gpl3))))
+
 (define-public sbcl-stumpwm+slynk
   (deprecated-package "sbcl-stumpwm-with-slynk" stumpwm+slynk))
 
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 16:18:02 GMT) Full text and rfc822 format available.

Message #23 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: [bug#57757] [PATCH] * gnu/packages/wm.scm: Add
 sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 18:17:33 +0200
[Message part 1 (text/plain, inline)]

On 19-09-2022 16:31, Trev wrote:
> Maxime Devos <maximedevos <at> telenet.be> writes:
> 
>> On 12-09-2022 23:41, Trevor Richards wrote:
>>> +      (inputs `(("stumpwm" ,stumpwm "lib")))
>>
>> Try running "./pre-inst-env guix style --input-simplification=always
>> sbcl-stumpwm-pamixer", it will have a proposed change.
>>
> 
> In my case it does not. I updated the label to "stumpwm:lib" in the
> hopes that I could patch it the way we like it.

OK, didn't expect that.  IIUC, you can drop the input label with

(inputs (list `(,stumpwm "lib")))

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 17:30:02 GMT) Full text and rfc822 format available.

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

From: Trev <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: Re: [bug#57757] [PATCH] * gnu/packages/wm.scm: Add
 sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 10:29:01 -0700
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

>>> On 12-09-2022 23:41, Trevor Richards wrote:
>>>> +      (inputs `(("stumpwm" ,stumpwm "lib")))
>>>
>>> Try running "./pre-inst-env guix style --input-simplification=always
>>> sbcl-stumpwm-pamixer", it will have a proposed change.
>>>
>> 
>> In my case it does not. I updated the label to "stumpwm:lib" in the
>> hopes that I could patch it the way we like it.
>
> OK, didn't expect that.  IIUC, you can drop the input label with
>
> (inputs (list `(,stumpwm "lib")))
>

Yes, this is preferrable. I will send a third revision of the patch.

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 17:48:01 GMT) Full text and rfc822 format available.

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

From: Trevor Richards <trev <at> trevdev.ca>
To: 57757 <at> debbugs.gnu.org
Cc: Maxime Devos <maximedevos <at> telenet.be>
Subject: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 10:47:24 -0700
[Message part 1 (text/plain, inline)]
---
 gnu/packages/wm.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 451dfce516..dd1e81544f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1986,6 +1986,40 @@ (define-public stumpish
     (description "This package provides a StumpWM interactive shell.")
     (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
 
+(define-public sbcl-stumpwm-pamixer
+  (let ((commit "aa820533c80ea1af5a0e107cea25eaf34e69dc24")
+        (revision "1"))
+    (package
+      (name "sbcl-stumpwm-pamixer")
+      (version (git-version "0.1.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Junker/stumpwm-pamixer")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
+      (inputs (list `(,stumpwm "lib")
+                    pamixer))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:asd-systems '(:pamixer)
+         #:phases
+         ,#~(modify-phases %standard-phases
+             (add-after 'unpack 'patch-pamixer
+               (lambda _
+                 (substitute* "pamixer.lisp"
+                   (("\"pamixer \"")
+                    (string-append
+                     "\"" #$pamixer "/bin/pamixer \""))))))))
+      (home-page "https://github.com/Junker/stumpwm-pamixer")
+      (synopsis "StumpWM Pamixer Module")
+      (description "Minimalistic Pulseaudio volume and microphone control
+module for StumpWM.")
+      (license license:gpl3))))
+
 (define-public sbcl-stumpwm+slynk
   (deprecated-package "sbcl-stumpwm-with-slynk" stumpwm+slynk))
 
-- 
2.37.3

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 18:06:01 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Trevor Richards <trev <at> trevdev.ca>, 57757 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 20:05:52 +0200
[Message part 1 (text/plain, inline)]

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.

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 18:23:02 GMT) Full text and rfc822 format available.

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

From: Trev <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 11:22:20 -0700
[Message part 1 (text/plain, inline)]
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?

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.

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.

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 18:34:02 GMT) Full text and rfc822 format available.

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Mon, 19 Sep 2022 21:36:01 GMT) Full text and rfc822 format available.

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

From: Trev <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 14:34:53 -0700
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

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

I see.  I am not yet familiar with the --with-input flag.  I will
explore this feature, thank you.

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

I see a double-quote there with ~''(:pamixer)~ - which is not something
I have ever tried to do before.  Is this a typo?

I had tried (list #:asd-systems '(:pamixer) #:phases #~([...])) and the
build failed due '(:pamixer) somehow not returning anything from a (car)
function.

Sometimes errors elsewhere cause nebulous tracebacks.  I will try this again.

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

I like the new way of using gexps.  They are more terse than needing to
assoc reference inputs/outputs.  The thought of as slow transition
happening had occured to me.  I appreciate your insight.

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Tue, 20 Sep 2022 04:40:02 GMT) Full text and rfc822 format available.

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

From: Trevor Richards <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Mon, 19 Sep 2022 21:38:57 -0700
[Message part 1 (text/plain, inline)]
---
 gnu/packages/wm.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index f329020eb4..912cddbca3 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -1987,6 +1987,40 @@ (define-public stumpish
     (description "This package provides a StumpWM interactive shell.")
     (license (list license:gpl2+ license:gpl3+ license:bsd-2))))
 
+(define-public sbcl-stumpwm-pamixer
+  (let ((commit "aa820533c80ea1af5a0e107cea25eaf34e69dc24")
+        (revision "1"))
+    (package
+      (name "sbcl-stumpwm-pamixer")
+      (version (git-version "0.1.1" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/Junker/stumpwm-pamixer")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0djcrr16bx40l7b60d4j507vk5l42fdgmjpgrnk86z1ba8wlqim8"))))
+      (inputs (list `(,stumpwm "lib") pamixer))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       (list #:asd-systems ''(:pamixer)
+             #:phases #~(modify-phases %standard-phases
+                          (add-after 'unpack 'patch-pamixer
+                            (lambda _
+                              (substitute* "pamixer.lisp"
+                                (("\"pamixer \"")
+                                 (string-append "\""
+                                                #$(this-package-input
+                                                   "pamixer")
+                                                "/bin/pamixer \""))))))))
+      (home-page "https://github.com/Junker/stumpwm-pamixer")
+      (synopsis "StumpWM Pamixer Module")
+      (description "Minimalistic Pulseaudio volume and microphone control
+module for StumpWM.")
+      (license license:gpl3))))
+
 (define-public sbcl-stumpwm+slynk
   (deprecated-package "sbcl-stumpwm-with-slynk" stumpwm+slynk))
 
-- 
2.37.3

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

Reply sent to Guillaume Le Vaillant <glv <at> posteo.net>:
You have taken responsibility. (Tue, 20 Sep 2022 07:20:02 GMT) Full text and rfc822 format available.

Notification sent to Trevor Richards <trev <at> trevdev.ca>:
bug acknowledged by developer. (Tue, 20 Sep 2022 07:20:02 GMT) Full text and rfc822 format available.

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

From: Guillaume Le Vaillant <glv <at> posteo.net>
To: Trevor Richards <trev <at> trevdev.ca>
Cc: 57757-done <at> debbugs.gnu.org
Subject: Re: [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Tue, 20 Sep 2022 07:17:57 +0000
[Message part 1 (text/plain, inline)]
Patch pushed as 4248fe076e006eb493320b23b4ddb9ebca36adbd.
Thanks.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Thu, 22 Sep 2022 19:09:02 GMT) Full text and rfc822 format available.

Message #52 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: Thu, 22 Sep 2022 21:08:09 +0200
[Message part 1 (text/plain, inline)]

On 19-09-2022 23:34, Trev wrote:
>> (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).
>>
> I see a double-quote there with ~''(:pamixer)~ - which is not something
> I have ever tried to do before.  Is this a typo?

No, it's intentional -- if you do '(:pa-mixers), the code (:pa-mixers) 
is passed to the builder, but that can't work, as :pa-mixers is 
undefined (or a keyword, depending on how the Guile reader is 
configured).  If you do ''(:pa-mixers), the code '(:pa-mixers) is passed 
to the builder, as intended.

If you change ''(:pa-mixers) to '(pa-mixers), then I expect you'll get a 
build failure.

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

Information forwarded to guix-patches <at> gnu.org:
bug#57757; Package guix-patches. (Thu, 22 Sep 2022 20:36:02 GMT) Full text and rfc822 format available.

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

From: Trev <trev <at> trevdev.ca>
To: Maxime Devos <maximedevos <at> telenet.be>, 57757 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add sbcl-stumpwm-pamixer
Date: Thu, 22 Sep 2022 13:35:14 -0700
[Message part 1 (text/plain, inline)]
Maxime Devos <maximedevos <at> telenet.be> writes:

> On 19-09-2022 23:34, Trev wrote:
>>> (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).
>>>
>> I see a double-quote there with ~''(:pamixer)~ - which is not something
>> I have ever tried to do before.  Is this a typo?
>
> No, it's intentional -- if you do '(:pa-mixers), the code (:pa-mixers) 
> is passed to the builder, but that can't work, as :pa-mixers is 
> undefined (or a keyword, depending on how the Guile reader is 
> configured).  If you do ''(:pa-mixers), the code '(:pa-mixers) is passed 
> to the builder, as intended.
>
> If you change ''(:pa-mixers) to '(pa-mixers), then I expect you'll get a 
> build failure.
>

I feel a little silly because after I asked my question I went ahead and
ran a ripgrep on the project root for a pattern of ''( and found
numerous occurences of it.  Of course it failed without the double
quote.

Thanks for all of your helpful feedback.  I have made notes so that I
can recall these concepts later.

-- 

Trev : 0FB7 D06B 4A2A F07E AD5B  1169 183B 6306 8AA1 D206
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 21 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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