GNU bug report logs -
#62589
Help with patch with delayed evaluation
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 24 Apr 2023 22:53:07 +0200
with message-id <87jzy10zpo.fsf_-_ <at> gnu.org>
and subject line Re: bug#62589: Help with patch with delayed evaluation
has caused the debbugs.gnu.org bug report #62589,
regarding Help with patch with delayed evaluation
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
62589: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62589
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi Guix!
I'm struggling with the definition of the variants of the nerd-dictation
package. I'm sending a commit here.
I get the following error messages:
sox/wtype: unbound variable
while (gnu packages audio) and (gnu packages freedesktop) are indeed
imported.
Originally, I wasn't using delayed evaluation, but I thought it might
help, but it doesn't. I've tried to rebuild my local installation
totally (make clean-go, make clean, then bootstrap from there), but it
doesn't work better.
Thanks if you can help!
--
Best regards,
Nicolas Graves
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hi Nicolas,
Nicolas Graves <ngraves <at> ngraves.fr> skribis:
> * gnu/packages/machine-learning.scm (nerd-dictation):
> Avoid inputs pulseaudio and ydotool when not necessary.
> Factor out wrapper make-nerd-dictation-package.
> Add package variants :
> - nerd-dictation/xdotool
> - nerd-dictation/sox-xdotool
> - nerd-dictation/sox-ydotool
> - nerd-dictation/sox-wtype
> ---
> gnu/packages/machine-learning.scm | 97 ++++++++++++++++++++++---------
> 1 file changed, 69 insertions(+), 28 deletions(-)
Applied with the changes below (using ‘with-imported-modules’ instead of
passing #:modules, and #$output instead of the now-deprecated
‘%output’).
I also tweaked the commit log according to our conventions.
Thank you,
Ludo’.
[Message part 5 (text/x-patch, inline)]
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 84b40e7b9b..c4dc668b82 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -3882,39 +3882,40 @@ (define-public nerd-dictation
(license license:gpl2+))))
(define (nerd-dictation-gexp input-name output-name bash nerd-dictation)
- #~(begin
- (use-modules (guix build utils))
- (let* ((exe (string-append %output "/bin/nerd-dictation"))
- (nerd-dictation-exe
- #$(file-append nerd-dictation "/bin/nerd-dictation")))
- (mkdir-p (dirname exe))
- (call-with-output-file exe
- (lambda (port)
- (format port "#!~a
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (let* ((exe (string-append #$output "/bin/nerd-dictation"))
+ (nerd-dictation-exe
+ #$(file-append nerd-dictation "/bin/nerd-dictation")))
+ (mkdir-p (dirname exe))
+ (call-with-output-file exe
+ (lambda (port)
+ (format port "#!~a
if [ \"$1\" = begin ]
then
exec ~a $@ --input=~a --simulate-input-tool=~a
else
exec ~a $@
fi"
- #$(file-append bash "/bin/bash")
- nerd-dictation-exe
- #$input-name
- #$output-name
- nerd-dictation-exe)))
- (chmod exe #o555))))
+ #$(file-append bash "/bin/bash")
+ nerd-dictation-exe
+ #$input-name
+ #$output-name
+ nerd-dictation-exe)))
+ (chmod exe #o555)))))
(define-public nerd-dictation/xdotool
(package
(inherit nerd-dictation)
(name "nerd-dictation-xdotool")
(build-system trivial-build-system)
- (arguments (list
- #:modules '((guix build utils))
- #:builder
- (nerd-dictation-gexp "PAREC" "XDOTOOL"
- (this-package-input "bash-minimal")
- (this-package-input "nerd-dictation"))))
+ (arguments
+ (list #:builder
+ (nerd-dictation-gexp "PAREC" "XDOTOOL"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"))))
(inputs (list bash-minimal nerd-dictation))
(propagated-inputs (list pulseaudio xdotool))))
@@ -3922,36 +3923,33 @@ (define-public nerd-dictation/sox-xdotool
(package
(inherit nerd-dictation/xdotool)
(name "nerd-dictation-sox-xdotool")
- (arguments (list
- #:modules '((guix build utils))
- #:builder
- (nerd-dictation-gexp "SOX" "XDOTOOL"
- (this-package-input "bash-minimal")
- (this-package-input "nerd-dictation"))))
+ (arguments
+ (list #:builder
+ (nerd-dictation-gexp "SOX" "XDOTOOL"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"))))
(propagated-inputs (list sox xdotool))))
(define-public nerd-dictation/sox-ydotool
(package
(inherit nerd-dictation/xdotool)
(name "nerd-dictation-sox-ydotool")
- (arguments (list
- #:modules '((guix build utils))
- #:builder
- (nerd-dictation-gexp "SOX" "YDOTOOL"
- (this-package-input "bash-minimal")
- (this-package-input "nerd-dictation"))))
+ (arguments
+ (list #:builder
+ (nerd-dictation-gexp "SOX" "YDOTOOL"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"))))
(propagated-inputs (list sox ydotool))))
(define-public nerd-dictation/sox-wtype
(package
(inherit nerd-dictation/xdotool)
(name "nerd-dictation-sox-wtype")
- (arguments (list
- #:modules '((guix build utils))
- #:builder
- (nerd-dictation-gexp "SOX" "WTYPE"
- (this-package-input "bash-minimal")
- (this-package-input "nerd-dictation"))))
+ (arguments
+ (list #:builder
+ (nerd-dictation-gexp "SOX" "WTYPE"
+ (this-package-input "bash-minimal")
+ (this-package-input "nerd-dictation"))))
(propagated-inputs (list sox wtype))))
(define-public python-brian2
This bug report was last modified 2 years and 24 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.