* [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
@ 2022-09-12 21:41 Trevor Richards
2022-09-12 21:41 ` [bug#57757] [PATCH] gnu: " Trevor Richards
` (3 more replies)
0 siblings, 4 replies; 17+ messages in thread
From: Trevor Richards @ 2022-09-12 21:41 UTC (permalink / raw)
To: 57757
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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-12 21:41 [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer Trevor Richards
2022-09-12 21:41 ` [bug#57757] [PATCH] gnu: " Trevor Richards
@ 2022-09-12 21:41 ` Trevor Richards
2022-09-16 7:50 ` Guillaume Le Vaillant
2022-09-16 9:07 ` [bug#57757] [PATCH] * gnu/packages/wm.scm: " Maxime Devos
2022-09-19 17:47 ` [bug#57757] [PATCH] gnu: " Trevor Richards
3 siblings, 1 reply; 17+ messages in thread
From: Trevor Richards @ 2022-09-12 21:41 UTC (permalink / raw)
To: 57757
---
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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-12 21:41 [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer Trevor Richards
@ 2022-09-12 21:41 ` Trevor Richards
2022-09-12 21:41 ` Trevor Richards
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Trevor Richards @ 2022-09-12 21:41 UTC (permalink / raw)
To: 57757; +Cc: Guillaume Le Vaillant, Maxime Devos
---
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
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-12 21:41 ` Trevor Richards
@ 2022-09-16 7:50 ` Guillaume Le Vaillant
0 siblings, 0 replies; 17+ messages in thread
From: Guillaume Le Vaillant @ 2022-09-16 7:50 UTC (permalink / raw)
To: Trevor Richards; +Cc: 57757
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
Trevor Richards <trev@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?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
2022-09-12 21:41 [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer Trevor Richards
2022-09-12 21:41 ` [bug#57757] [PATCH] gnu: " Trevor Richards
2022-09-12 21:41 ` Trevor Richards
@ 2022-09-16 9:07 ` Maxime Devos
2022-09-19 14:31 ` Trev
2022-09-19 17:47 ` [bug#57757] [PATCH] gnu: " Trevor Richards
3 siblings, 1 reply; 17+ messages in thread
From: Maxime Devos @ 2022-09-16 9:07 UTC (permalink / raw)
To: Trevor Richards, 57757
[-- Attachment #1.1.1: Type: text/plain, Size: 810 bytes --]
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
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
2022-09-16 9:07 ` [bug#57757] [PATCH] * gnu/packages/wm.scm: " Maxime Devos
@ 2022-09-19 14:31 ` Trev
2022-09-19 16:17 ` Maxime Devos
0 siblings, 1 reply; 17+ messages in thread
From: Trev @ 2022-09-19 14:31 UTC (permalink / raw)
To: Maxime Devos, 57757
Maxime Devos <maximedevos@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
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
2022-09-19 14:31 ` Trev
@ 2022-09-19 16:17 ` Maxime Devos
2022-09-19 17:29 ` Trev
0 siblings, 1 reply; 17+ messages in thread
From: Maxime Devos @ 2022-09-19 16:17 UTC (permalink / raw)
To: Trev, 57757
[-- Attachment #1.1.1: Type: text/plain, Size: 584 bytes --]
On 19-09-2022 16:31, Trev wrote:
> Maxime Devos <maximedevos@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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer
2022-09-19 16:17 ` Maxime Devos
@ 2022-09-19 17:29 ` Trev
0 siblings, 0 replies; 17+ messages in thread
From: Trev @ 2022-09-19 17:29 UTC (permalink / raw)
To: Maxime Devos, 57757
[-- Attachment #1: Type: text/plain, Size: 677 bytes --]
Maxime Devos <maximedevos@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-12 21:41 [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer Trevor Richards
` (2 preceding siblings ...)
2022-09-16 9:07 ` [bug#57757] [PATCH] * gnu/packages/wm.scm: " Maxime Devos
@ 2022-09-19 17:47 ` Trevor Richards
2022-09-19 18:05 ` Maxime Devos
3 siblings, 1 reply; 17+ messages in thread
From: Trevor Richards @ 2022-09-19 17:47 UTC (permalink / raw)
To: 57757; +Cc: Maxime Devos
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
---
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 17:47 ` [bug#57757] [PATCH] gnu: " Trevor Richards
@ 2022-09-19 18:05 ` Maxime Devos
2022-09-19 18:22 ` Trev
0 siblings, 1 reply; 17+ messages in thread
From: Maxime Devos @ 2022-09-19 18:05 UTC (permalink / raw)
To: Trevor Richards, 57757
[-- Attachment #1.1.1: Type: text/plain, Size: 708 bytes --]
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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 18:05 ` Maxime Devos
@ 2022-09-19 18:22 ` Trev
2022-09-19 18:33 ` Maxime Devos
0 siblings, 1 reply; 17+ messages in thread
From: Trev @ 2022-09-19 18:22 UTC (permalink / raw)
To: Maxime Devos, 57757
[-- Attachment #1: Type: text/plain, Size: 1632 bytes --]
Maxime Devos <maximedevos@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 18:22 ` Trev
@ 2022-09-19 18:33 ` Maxime Devos
2022-09-19 21:34 ` Trev
0 siblings, 1 reply; 17+ messages in thread
From: Maxime Devos @ 2022-09-19 18:33 UTC (permalink / raw)
To: Trev, 57757
[-- Attachment #1.1.1: Type: text/plain, Size: 2337 bytes --]
On 19-09-2022 20:22, Trev wrote:
> Maxime Devos <maximedevos@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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 18:33 ` Maxime Devos
@ 2022-09-19 21:34 ` Trev
2022-09-20 4:38 ` Trevor Richards
2022-09-22 19:08 ` [bug#57757] " Maxime Devos
0 siblings, 2 replies; 17+ messages in thread
From: Trev @ 2022-09-19 21:34 UTC (permalink / raw)
To: Maxime Devos, 57757
[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]
Maxime Devos <maximedevos@telenet.be> writes:
> On 19-09-2022 20:22, Trev wrote:
>> Maxime Devos <maximedevos@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 21:34 ` Trev
@ 2022-09-20 4:38 ` Trevor Richards
2022-09-20 7:17 ` bug#57757: " Guillaume Le Vaillant
2022-09-22 19:08 ` [bug#57757] " Maxime Devos
1 sibling, 1 reply; 17+ messages in thread
From: Trevor Richards @ 2022-09-20 4:38 UTC (permalink / raw)
To: Maxime Devos, 57757
[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]
---
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply related [flat|nested] 17+ messages in thread
* bug#57757: [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-20 4:38 ` Trevor Richards
@ 2022-09-20 7:17 ` Guillaume Le Vaillant
0 siblings, 0 replies; 17+ messages in thread
From: Guillaume Le Vaillant @ 2022-09-20 7:17 UTC (permalink / raw)
To: Trevor Richards; +Cc: 57757-done
[-- Attachment #1: Type: text/plain, Size: 66 bytes --]
Patch pushed as 4248fe076e006eb493320b23b4ddb9ebca36adbd.
Thanks.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-19 21:34 ` Trev
2022-09-20 4:38 ` Trevor Richards
@ 2022-09-22 19:08 ` Maxime Devos
2022-09-22 20:35 ` Trev
1 sibling, 1 reply; 17+ messages in thread
From: Maxime Devos @ 2022-09-22 19:08 UTC (permalink / raw)
To: Trev, 57757
[-- Attachment #1.1.1: Type: text/plain, Size: 861 bytes --]
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.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer
2022-09-22 19:08 ` [bug#57757] " Maxime Devos
@ 2022-09-22 20:35 ` Trev
0 siblings, 0 replies; 17+ messages in thread
From: Trev @ 2022-09-22 20:35 UTC (permalink / raw)
To: Maxime Devos, 57757
[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]
Maxime Devos <maximedevos@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2022-09-22 20:36 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12 21:41 [bug#57757] [PATCH] * gnu/packages/wm.scm: Add sbcl-stumpwm-pamixer Trevor Richards
2022-09-12 21:41 ` [bug#57757] [PATCH] gnu: " Trevor Richards
2022-09-12 21:41 ` Trevor Richards
2022-09-16 7:50 ` Guillaume Le Vaillant
2022-09-16 9:07 ` [bug#57757] [PATCH] * gnu/packages/wm.scm: " Maxime Devos
2022-09-19 14:31 ` Trev
2022-09-19 16:17 ` Maxime Devos
2022-09-19 17:29 ` Trev
2022-09-19 17:47 ` [bug#57757] [PATCH] gnu: " Trevor Richards
2022-09-19 18:05 ` Maxime Devos
2022-09-19 18:22 ` Trev
2022-09-19 18:33 ` Maxime Devos
2022-09-19 21:34 ` Trev
2022-09-20 4:38 ` Trevor Richards
2022-09-20 7:17 ` bug#57757: " Guillaume Le Vaillant
2022-09-22 19:08 ` [bug#57757] " Maxime Devos
2022-09-22 20:35 ` Trev
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.