From patchwork Thu Sep 29 09:00:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 43040 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 EDE0927BBEA; Thu, 29 Sep 2022 10:08:45 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS 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 9FE3327BBE9 for ; Thu, 29 Sep 2022 10:08:45 +0100 (BST) Received: from localhost ([::1]:39322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odpXA-0004CC-P9 for patchwork@mira.cbaines.net; Thu, 29 Sep 2022 05:08:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odpQh-0007sq-4X for guix-patches@gnu.org; Thu, 29 Sep 2022 05:02:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1odpQg-0004Re-Sp for guix-patches@gnu.org; Thu, 29 Sep 2022 05:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1odpQg-0002z6-O1 for guix-patches@gnu.org; Thu, 29 Sep 2022 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58140] [PATCH v3 6/6] gnu: Add python-nerd-dictation/wayland. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Sep 2022 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58140 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 58140@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 58140-submit@debbugs.gnu.org id=B58140.166444206411385 (code B ref 58140); Thu, 29 Sep 2022 09:02:02 +0000 Received: (at 58140) by debbugs.gnu.org; 29 Sep 2022 09:01:04 +0000 Received: from localhost ([127.0.0.1]:35943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odpPk-0002xU-AD for submit@debbugs.gnu.org; Thu, 29 Sep 2022 05:01:04 -0400 Received: from 6.mo550.mail-out.ovh.net ([46.105.43.205]:54277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1odpPh-0002wa-It for 58140@debbugs.gnu.org; Thu, 29 Sep 2022 05:01:02 -0400 Received: from player771.ha.ovh.net (unknown [10.109.156.142]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id D6B7E23186 for <58140@debbugs.gnu.org>; Thu, 29 Sep 2022 09:00:59 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player771.ha.ovh.net (Postfix) with ESMTPSA id 28EF02F20CDC5; Thu, 29 Sep 2022 09:00:58 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-97G0023b1f6dd1-4be9-4be3-8ff4-61690de35b3b, B0E8D5270CD01EFF20DD9E8B4F81152F34611B42) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 213.44.161.47 Date: Thu, 29 Sep 2022 11:00:22 +0200 Message-Id: <20220929090022.5950-6-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220929090022.5950-1-ngraves@ngraves.fr> References: <20220929090022.5950-1-ngraves@ngraves.fr> MIME-Version: 1.0 X-Ovh-Tracer-Id: 6830553261020930786 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehtddgudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppedtrddtrddtrddtpddvudefrdeggedrudeiuddrgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehplhgrhigvrhejjedurdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedupdhrtghpthhtohepheekudegtdesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheehtd 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" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves X-getmail-retrieved-from-mailbox: Patches * 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)))))))