From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 58140@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#58140] [PATCH v3 6/6] gnu: Add python-nerd-dictation/wayland.
Date: Thu, 29 Sep 2022 11:00:22 +0200 [thread overview]
Message-ID: <20220929090022.5950-6-ngraves@ngraves.fr> (raw)
In-Reply-To: <20220929090022.5950-1-ngraves@ngraves.fr>
* gnu/packages/machine-learning.scm (python-nerd-dictation/wayland): New variable.
---
gnu/packages/machine-learning.scm | 35 +++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f2c9b8dace..c0d6ccfd19 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -45,6 +45,7 @@ (define-module (gnu packages machine-learning)
#:use-module (guix build-system ocaml)
#:use-module (guix build-system python)
#:use-module (guix build-system r)
+ #:use-module (guix build-system trivial)
#:use-module (guix git-download)
#:use-module (gnu packages)
#:use-module (gnu packages adns)
@@ -103,6 +104,7 @@ (define-module (gnu packages machine-learning)
#:use-module (gnu packages video)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
+ #:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (ice-9 match))
@@ -3636,3 +3638,36 @@ (define-public nerd-dictation
there are no background processes. Dictation is accessed manually with
@code{nerd-dictation begin} and @code{nerd-dictation end} commands.")
(license license:gpl3+))))
+
+(define-public nerd-dictation/wayland
+ (package
+ (inherit nerd-dictation)
+ (name "nerd-dictation-wayland")
+ (inputs (list bash-minimal nerd-dictation))
+ (propagated-inputs (list ydotool sox))
+ (build-system trivial-build-system)
+ (arguments
+ (list
+ #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((exe (string-append #$output "/bin/nerd-dictation"))
+ (original-exe #$(file-append nerd-dictation
+ "/bin/nerd-dictation"))
+ (bash #$(this-package-input "bash-minimal"))
+ (bash-exe (string-append bash "/bin/bash")))
+ (mkdir-p (dirname exe))
+ (call-with-output-file exe
+ (lambda (port)
+ (format port "#!~a
+if [ \"$1\" = begin ]
+ then
+ exec ~a $@ --input=SOX --simulate-input-tool=YDOTOOL
+ else
+ exec ~a $@
+fi"
+ bash-exe
+ original-exe
+ original-exe)))
+ (chmod exe #o555)))))))
--
2.37.3
next prev parent reply other threads:[~2022-09-29 9:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 11:34 [bug#58140] Simple offline text-to-speech incoming ! Nicolas Graves via Guix-patches via
2022-09-28 11:57 ` [bug#58140] [PATCH 1/6] gnu: Add openfst-for-vosk Nicolas Graves via Guix-patches via
2022-09-28 11:57 ` [bug#58140] [PATCH 2/6] gnu: Add kaldi-for-vosk Nicolas Graves via Guix-patches via
2022-09-28 21:05 ` Maxime Devos
2022-09-29 6:44 ` ( via Guix-patches via
2022-09-29 8:20 ` Nicolas Graves via Guix-patches via
2022-09-29 9:32 ` Maxime Devos
2022-09-28 11:57 ` [bug#58140] [PATCH 3/6] gnu: Add vosk-api Nicolas Graves via Guix-patches via
2022-09-28 11:57 ` [bug#58140] [PATCH 4/6] gnu: Add python-vosk Nicolas Graves via Guix-patches via
2022-09-28 11:57 ` [bug#58140] [PATCH 5/6] gnu: Add python-nerd-dictation Nicolas Graves via Guix-patches via
2022-09-28 11:57 ` [bug#58140] [PATCH 6/6] gnu: Add python-nerd-dictation/wayland Nicolas Graves via Guix-patches via
2022-09-28 17:58 ` [bug#58140] Simple offline text-to-speech incoming ! Denis 'GNUtoo' Carikli
2022-09-28 20:07 ` Nicolas Graves via Guix-patches via
2022-09-28 21:30 ` [bug#58140] [PATCH 6/6 v2] gnu: Add python-nerd-dictation/wayland Nicolas Graves via Guix-patches via
2022-09-28 21:39 ` Maxime Devos
2022-09-29 9:00 ` [bug#58140] [PATCH v3 1/6] gnu: Add openfst-for-vosk Nicolas Graves via Guix-patches via
2022-09-29 9:00 ` [bug#58140] [PATCH v3 2/6] gnu: Add kaldi-for-vosk Nicolas Graves via Guix-patches via
2022-09-29 9:00 ` [bug#58140] [PATCH v3 3/6] gnu: Add vosk-api Nicolas Graves via Guix-patches via
2022-09-29 9:00 ` [bug#58140] [PATCH v3 4/6] gnu: Add python-vosk Nicolas Graves via Guix-patches via
2022-09-29 9:00 ` [bug#58140] [PATCH v3 5/6] gnu: Add python-nerd-dictation Nicolas Graves via Guix-patches via
2022-09-29 9:00 ` Nicolas Graves via Guix-patches via [this message]
2022-09-29 9:02 ` [bug#58140] [PATCH v4 1/2] gnu: Add nerd-dictation Nicolas Graves via Guix-patches via
2022-09-29 9:02 ` [bug#58140] [PATCH v4 2/2] gnu: Add nerd-dictation/wayland Nicolas Graves via Guix-patches via
2022-10-17 8:46 ` bug#58140: Simple offline text-to-speech incoming ! Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220929090022.5950-6-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=58140@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).