From patchwork Fri Oct 14 20:09:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hunter Jozwiak X-Patchwork-Id: 43409 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CE6D927BBEA; Fri, 14 Oct 2022 21:10:23 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 4767627BBE9 for ; Fri, 14 Oct 2022 21:10:23 +0100 (BST) Received: from localhost ([::1]:55518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojR0g-000568-EV for patchwork@mira.cbaines.net; Fri, 14 Oct 2022 16:10:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojR0M-00055z-Vk for guix-patches@gnu.org; Fri, 14 Oct 2022 16:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojR0M-0004Oz-NI for guix-patches@gnu.org; Fri, 14 Oct 2022 16:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojR0M-0006ZA-GZ for guix-patches@gnu.org; Fri, 14 Oct 2022 16:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58528] [PATCH] gnu: Services: Add espeakup service. Resent-From: hunter.t.joz@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 14 Oct 2022 20:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 58528 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58528@debbugs.gnu.org Cc: Hunter Jozwiak X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166577816425179 (code B ref -1); Fri, 14 Oct 2022 20:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Oct 2022 20:09:24 +0000 Received: from localhost ([127.0.0.1]:38700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojQzk-0006Y3-6H for submit@debbugs.gnu.org; Fri, 14 Oct 2022 16:09:24 -0400 Received: from lists.gnu.org ([209.51.188.17]:41794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojQzi-0006Xv-40 for submit@debbugs.gnu.org; Fri, 14 Oct 2022 16:09:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojQzh-000545-Uu for guix-patches@gnu.org; Fri, 14 Oct 2022 16:09:21 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:44013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojQzf-0004Dm-UL for guix-patches@gnu.org; Fri, 14 Oct 2022 16:09:21 -0400 Received: by mail-lf1-x12e.google.com with SMTP id d6so8823451lfs.10 for ; Fri, 14 Oct 2022 13:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:from:from:to:cc:subject:date:message-id:reply-to; bh=owYyicYRAZC8oqLwvT8aWJEHh+QWDKBDO7q+AAA0zZ8=; b=mqEw04o2Bax9HFC+gc33mX6yWymPc+7XOzR1qdzmg+Z6E7HoFZQ7unBUYA9eZMCwiM 71AvFQ0YGwqDQs4cCxOj5q4sxakCOeeu/7ZPCkGbzIh61n9JHrsJeoiopaBO3BfSQ+8l Vm+ZS4xVUMiUwCa1WsX2ysKen/b6LxUhqZAuryDJnZSfmlRsD+vK3fn97o4uN9f/UE5f fN0u7u3ZF8mBZLbaG/ytlLOk4NE6VjBnM0OKst0sVNQgw8z0YoJy3OGzSWgTd1eLXTq7 lDajjEK0/3+6x1DSnP02MOQiWsz8zDDFOfQyf4l9uP6WQi4NQBVqXUzG9Mws/pwJYw94 8qOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=owYyicYRAZC8oqLwvT8aWJEHh+QWDKBDO7q+AAA0zZ8=; b=D9R/NabrWAtuoG+H51aC7Mk9f9BWo+Umb+ZUPVSclWbwbi7dJL8aLRToDLk3qUytgT VIjw3/X0+NUF01gVTNcKUDoc8A2pqSdnMnOYQVsPreOklnaziAKrOWFlvEq1WMc4j6zI MJ8BeC7fpH6Qr3o3r73Bhpa4SPOBXAsWw04Gud2hK40ZV8JSXQ7lv6NajWhRMaVWz+d5 9xs7nUnFYlrnLI7x2Y8yr62qJp/ioq+q3IOF4Xav0PN3+E4CEh0Ho7KEWfCLFs7cBOag FrCU91SLpYqdaThuGwuCkKSVMomYfxa9xBe1yzk618Lbh+iUwat/47aYDK1Iupv228Qu s98g== X-Gm-Message-State: ACrzQf0DgjSxbgRCJIGwM5vHOrQbeOE9873VDw5RN1vgn6AK/EV1J4kj CRzY7D1jVixY0l0uNdMGw991XuXjwHbjYQeTMhrgLntEavA= X-Google-Smtp-Source: AMsMyM7aXazRXS9aO0PpADpLCHpUm1wx+x/a5vthVpT/+EOY/WQ+A4czXjL9n7suCn1h4GKP+wHiKArubXKyPrxmQhw= X-Received: by 2002:a05:6512:39d6:b0:4a2:a97d:c880 with SMTP id k22-20020a05651239d600b004a2a97dc880mr2292673lfu.220.1665778155992; Fri, 14 Oct 2022 13:09:15 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 14 Oct 2022 13:09:14 -0700 From: hunter.t.joz@gmail.com X-Mailer: git-send-email 2.38.0 MIME-Version: 1.0 Date: Fri, 14 Oct 2022 13:09:14 -0700 Message-ID: Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=hunter.t.joz@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Hunter Jozwiak * gnu/services/accessibility.scm: add espeakup-configuration, espeakup-shepherd-service, and espeakup-service-type. * doc/guix.texi (Accessibility Services): Document the espeakup configuration. --- doc/guix.texi | 19 ++++++++++++ gnu/services/accessibility.scm | 56 ++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 gnu/services/accessibility.scm + espeakup-shepherd-service) + (service-extension + kernel-module-loader-service-type + (const (list "speakup_soft"))))) + (default-value (espeakup-configuration)))) 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 @node Scheduled Job Execution @subsection Scheduled Job Execution diff --git a/gnu/services/accessibility.scm b/gnu/services/accessibility.scm new file mode 100644 index 0000000000..5dc8825bec --- /dev/null +++ b/gnu/services/accessibility.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Hunter Jozwiak + +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services accessibility) + #:use-module (gnu packages accessibility) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services linux) + #:use-module (gnu services shepherd) + #:use-module (guix gexp) + #:use-module (guix records) + #:export (espeakup-configuration espeakup-service-type)) + +;; Espeakup service +(define-configuration/no-serialization espeakup-configuration + (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))))) + +(define espeakup-service-type + (service-type (name 'espeakup) + (description + "A lightweight connector between espeak and speakup.") + (extensions (list (service-extension + shepherd-root-service-type