Message ID | eac2dee14619f97f9064c3c87c37f3f2f806b8dc.1663608658.git.trev@trevdev.ca |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D081A27BBEA; Mon, 19 Sep 2022 19:22:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 57C3F27BBE9 for <patchwork@mira.cbaines.net>; Mon, 19 Sep 2022 19:22:50 +0100 (BST) Received: from localhost ([::1]:42472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1oaLPt-0000ip-G4 for patchwork@mira.cbaines.net; Mon, 19 Sep 2022 14:22:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oaKsE-0000KX-PA for guix-patches@gnu.org; Mon, 19 Sep 2022 13:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oaKsE-0004tQ-Ds for guix-patches@gnu.org; Mon, 19 Sep 2022 13:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1oaKsD-0003gm-UW for guix-patches@gnu.org; Mon, 19 Sep 2022 13:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57757] [PATCH] gnu: Add sbcl-stumpwm-pamixer References: <989c9758e8200e80725bba437bdbc6a3e5ccf56e.1663018914.git.trev@trevdev.ca> In-Reply-To: <989c9758e8200e80725bba437bdbc6a3e5ccf56e.1663018914.git.trev@trevdev.ca> Resent-From: Trevor Richards <trev@trevdev.ca> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Sep 2022 17:48:01 +0000 Resent-Message-ID: <handler.57757.B57757.166360965614058@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57757 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57757@debbugs.gnu.org Cc: Maxime Devos <maximedevos@telenet.be> Received: via spool by 57757-submit@debbugs.gnu.org id=B57757.166360965614058 (code B ref 57757); Mon, 19 Sep 2022 17:48:01 +0000 Received: (at 57757) by debbugs.gnu.org; 19 Sep 2022 17:47:36 +0000 Received: from localhost ([127.0.0.1]:55135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1oaKro-0003ef-08 for submit@debbugs.gnu.org; Mon, 19 Sep 2022 13:47:36 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:51377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <trev@trevdev.ca>) id 1oaKrl-0003eQ-Iy for 57757@debbugs.gnu.org; Mon, 19 Sep 2022 13:47:34 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9242532006F2; Mon, 19 Sep 2022 13:47:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 19 Sep 2022 13:47:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trevdev.ca; h=cc :cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1663609647; x=1663696047; bh=rCblTt2Ql+icgz50CyRU2x34cL05np4qF0N drx4zZc4=; b=X020aD8B/7SgCf1goJ/B9ycnASDfaNSJAN3QYAZmI3EMWV2QxQI AzRHHR484liA3ODS/Ck4monN8Q9A0oi+GtaXZi3iEA3K/2/N050dh4YGlRvfMwAC YYYZyVhCMMNQfVxlUJasff47ZQKBCX3u7Po8brzbsKuovAcTAv9jqr+Gifv3QRrB sNsw52nTfXGgi4wzUOYkh21xY1R8/z/g/FIxg+7MZb4uv32X47VJXho8oF4n0369 iBT3uuQ48hWKzlf3PGORaXOCzojBKWaCrXtDJ5bS++g6A4uKyFQpEwjK6v6w74NO X1eL3okYgJS/Z8zngRUav7KCaAvn8Vzq/yg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663609647; x= 1663696047; bh=rCblTt2Ql+icgz50CyRU2x34cL05np4qF0Ndrx4zZc4=; b=e ndq/X9je9vjpHKXTe7w+PwFwcWLSMbX1pSxURsazvQgjv6tOUKwtpI2urM5YGPXS Z/b3CQqCz/1p997A1dRWjoD/6jEIjBHHFPm1qRtYB8ujagQugxXL6fKLsYX7f2xC EUqVQuFQwn7K2vEp91qZ1U1XXre6x5sBGYBFHZWyJ7X+evf3WwwfL8MU+0Uqd6EX erCqWfUxPLf0+AOFvSPHCDDcKX5S42O8hzvHxJEku1le1btv0SmRXLD4AIabjcCz shtowUs2X9KUXEVbPKhneph4NhrxFmMDb3Vb5YLOuJeNo2RqUyWt3ojm+FppQyXH aMem7yxeJWd54ZNUVpAeA== X-ME-Sender: <xms:LqsoYzspxA244oHFase0EENEui1IcTPrtpzbG6AeeOtBLsR3bNjn3A> <xme:LqsoY0es6o17fKF1PvbCtNeq_H_SC2DkFiNRKmGweUsypZMFX0Igv8IVEw1BU2NwE -nWVYvIDkq4OKVekEE> X-ME-Received: <xmr:LqsoY2x8h571bP_M9QGylYLNvla09EEd51LKt0iD2OBUdUgUgAUK8BthygupP2Ty-wONsr7xJ770RcCYs8t5KR_2I5-UPA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvjedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufgfkfffgggtsehgtderredtredtnecuhfhrohhmpefvrhgvvhho rhcutfhitghhrghrughsuceothhrvghvsehtrhgvvhguvghvrdgtrgeqnecuggftrfgrth htvghrnhepjedvffefiedtgfdutdejjeejgffhffejteejueeiudejudfhveduuddtgeeg hedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehtrhgvvhesthhrvghvuggvvhdrtggr X-ME-Proxy: <xmx:LqsoYyNu7NkYLIQ8_iXIXIAE1Voy39Qxu5PlGfIRZ-Pz4oPBh_U_Xw> <xmx:LqsoYz8bJlMPdYRJno0rDRF8bMZbjEbGINzdKwxXDor4OwvLoNl0bg> <xmx:LqsoYyXQruSolC9xCdf2wv1O1BaOOaq7n4lWWPPjNytHwQISOyNfjA> <xmx:L6soYwE7p83Oh6Cf-jOh4df5ZrjUdz4qt4dAyOd2XuoWXkE7kkIXLQ> Feedback-ID: i762946f9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 19 Sep 2022 13:47:26 -0400 (EDT) From: Trevor Richards <trev@trevdev.ca> User-Agent: Notmuch/0.36 (https://notmuchmail.org) Emacs/28.1 (x86_64-pc-linux-gnu) Message-Id: <eac2dee14619f97f9064c3c87c37f3f2f806b8dc.1663608658.git.trev@trevdev.ca> Date: Mon, 19 Sep 2022 10:47:24 -0700 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#57757] gnu: Add sbcl-stumpwm-pamixer
|
|
Commit Message
Trevor Richards
Sept. 19, 2022, 5:47 p.m. UTC
--- gnu/packages/wm.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
Comments
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.
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.
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.
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.
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.
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.
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))