From: "\( via Guix-patches" via <guix-patches@gnu.org>
To: <hunter.t.joz@gmail.com>, <58528@debbugs.gnu.org>
Subject: [bug#58528] [PATCH] gnu: Services: Add espeakup service.
Date: Fri, 14 Oct 2022 21:26:24 +0100 [thread overview]
Message-ID: <CNLXFSW3F1O9.1ZEF4DPX3CS49@guix-framework> (raw)
In-Reply-To: <CAJ1hvUHRrJ32WyYJXe27n-2qoK-qqLsWGwpq7-8N3+P9b+yqRA@mail.gmail.com>
Heya,
On Fri Oct 14, 2022 at 9:09 PM BST, wrote:
> diff --git a/doc/guix.texi b/doc/guix.texi
> index dbf4ca9be9..73dc647ca5 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -17572,6 +17572,7 @@ Services
>
> @menu
> * Base Services:: Essential system services.
> +* Accessibility Services:: For those with various impairments.
> * Scheduled Job Execution:: The mcron service.
> * Log Rotation:: The rottlog service.
> * Networking Setup:: Setting up network interfaces.
> @@ -18793,6 +18794,24 @@ Base Services
> (local-file "sway-greetd.conf"))))))))
> @end lisp
> @end deftp
> +@node Accessibility Services
> +@subsection Accessibility Services
> +%espeakup-configuration
> +@c %start of fragment
> +
> +@deftp {Data Type} espeakup-configuration
> +Available @code{espeakup-configuration} fields are:
> +
> +@table @asis
> +@item @code{default-voice} (default: @code{"en-US"}) (type: string)
> +Set the voice that espeak-ng should use by default.
> +
> +@end table
> +
> +@end deftp
> +
> +
> +@c %end of fragment
Remember to add your copyright notice to the manual's copyright section.
> + (define-module (gnu services accessibility)
Since this is a new file, you'll need to update ``gnu/local.mk'' accordingly.
> +
Remove this empty line after the ``;;; Copyright ...'' line.
> + #:export (espeakup-configuration espeakup-service-type))
You should probably put each variable here on a new line.
> +
> +;; Espeakup service
Instead of this, do this:
^L
;;;
;;; Espeakup.
;;;
The ^L is a control character, not a literal ``^L''. Look at one of the other
files and copy their ^L in. Also, add another newline after this "section
comment".
> +(define-configuration/no-serialization espeakup-configuration
> + (default-voice (string "en-US")
> + "Set the voice that espeak-ng
> should use by default."))
Funky indentation here, and there needs to be a field for customizing the
``espeakup'' package to use. Should be:
(define-configuration/no-serialization espeakup-configuration
(espeakup
(file-like espeakup)
"Set the package providing the @code{/bin/espeakup} command.")
(default-voice
(string "en-US")
"Set the voice that espeak-ng should use by default."))
> +(define (espeakup-shepherd-service config)
> + (list (shepherd-service (provision '(espeakup))
> + (documentation "The espeak-ng bridge to speakup.")
> + (requirement '(user-processes))
> + (start #~(make-forkexec-constructor (list
> (string-append #$espeakup
> +
> "/bin/espeakup"
> + "-v"
> +
> #$(espeakup-configuration-default-voice
> +
> config)))))
> + (stop #~(make-kill-destructor)))))
Again, indentation is off here, and there's a small issue with ``string-append''
being used where ``file-append'' should be. Try this instead:
(define (espeakup-shepherd-service config)
(list (shepherd-service
(provision '(espeakup))
(requirement '(user-processes))
(documentation "Run espeakup, the espeak-ng bridge to speakup.")
(start
#~(make-forkexec-constructor
(list #$(file-append (espeakup-configuration-espeakup config)
"/bin/espeakup")
"-v" #$(espeakup-configuration-default-voice config))))
(stop #~(make-kill-destructor)))))
> +(define espeakup-service-type
> + (service-type (name 'espeakup)
> + (description
> + "A lightweight connector between espeak and speakup.")
> + (extensions (list (service-extension
> + shepherd-root-service-type
> + espeakup-shepherd-service)
> + (service-extension
> + kernel-module-loader-service-type
> + (const (list "speakup_soft")))))
> + (default-value (espeakup-configuration))))
Here too; try this:
(define espeakup-service-type
(service-type
(name 'espeakup)
(extensions
(list (service-extension shepherd-root-service-type
espeakup-shepherd-services)
(service-extension kernel-module-loader-service-type
(const (list "speakup_soft")))))
(default-value (espeakup-configuration))
(description
"Configure and run espeakup, a lightweight bridge between espeak-ng
and speakup.")))
-- (
next prev parent reply other threads:[~2022-10-14 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 20:09 [bug#58528] [PATCH] gnu: Services: Add espeakup service hunter.t.joz
2022-10-14 20:26 ` ( via Guix-patches via [this message]
2022-10-15 15:09 ` Hunter Jozwiak
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=CNLXFSW3F1O9.1ZEF4DPX3CS49@guix-framework \
--to=guix-patches@gnu.org \
--cc=58528@debbugs.gnu.org \
--cc=hunter.t.joz@gmail.com \
--cc=paren@disroot.org \
/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).