From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eGj9A4rsRmRgIQEASxT56A (envelope-from ) for ; Mon, 24 Apr 2023 22:54:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:c151::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GDfzA4rsRmT8NQAA9RJhRA (envelope-from ) for ; Mon, 24 Apr 2023 22:54:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CBF103E9B1 for ; Mon, 24 Apr 2023 22:54:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BgMGVpSd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682369673; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-to:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Gy2pzpYX89rQAK5F6T0Wh3C84sYT/EGmIFPBWB0dAlE=; b=VYSK4B1uaQXWH2QvFL+1tWQ6XRK8wcO2Pem5wiNl7DxCxKiNUky5DHJCbNrxrTzeIU8lWI jbFoytdVJeeiGHqoKISnzr9I0mXeCc6UnZcT/MOruQG/gHs8ro/sQz0VUfMq4ZKkcFJl/j le6S5t2aU6S2DLtmbgdMrdMF8ub5kZfF9rOdnlq6fXxUwv/4lZqfyUG7K39IZKZJPO2nq7 OgMIPsFijqCBx1QU0ZrlxKdG9s9q9KQxR6ZrNX69yOuzoQGRqS290x8d/cOn6D1XoVdTgG MonqMvYv6aSe+uxxf/Y8SWqCYnNekFQw421nT/G2HHNKzbNJk/hNUYL+B8S2zw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BgMGVpSd; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682369673; a=rsa-sha256; cv=none; b=ddr3mvqOn7Yi9xaYyjrSS1/JiB5LT9dSZpLJZTeuDK/jIT9Hb8/pBAkDxAi2kEZgyN8244 LMI+igXhnA949v0Y9fUoRSpQ9Up+0CP+sYRtOsRuJTlrD718PrvzM7wqPTXxmbzjJJ1q4y EntWN3cj+xHHKfAHxrw3Bowc4pdzQCtvzfjdoDDPcyUKXz7eQN5ApMtP47w37D0feD5n8Z JvtFHAfw5usCxQFx6GWm5vv2YMXIQKoa+pALjJzyVr+f/MNJNWYKlv0gjXS/uUhHxT65Lf KM4x+VyWdrND2Japw68sW5zyBdfcdMzxzaq4c2AW0QsrPBxyrCyEW0ryN7zu+w== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pr3CG-0008HM-Qg; Mon, 24 Apr 2023 16:54:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3CF-0008Ek-39 for bug-guix@gnu.org; Mon, 24 Apr 2023 16:54:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pr3CE-00053a-H2 for bug-guix@gnu.org; Mon, 24 Apr 2023 16:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pr3CD-0000w4-WB for bug-guix@gnu.org; Mon, 24 Apr 2023 16:54:02 -0400 Subject: bug#62589: Help with patch with delayed evaluation Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: bug-guix@gnu.org Resent-Date: Mon, 24 Apr 2023 20:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 62589 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Nicolas Graves Cc: 62589-done@debbugs.gnu.org Mail-Followup-To: 62589@debbugs.gnu.org, ludo@gnu.org, ngraves@ngraves.fr Received: via spool by 62589-done@debbugs.gnu.org id=D62589.16823695993531 (code D ref 62589); Mon, 24 Apr 2023 20:54:01 +0000 Received: (at 62589-done) by debbugs.gnu.org; 24 Apr 2023 20:53:19 +0000 Received: from localhost ([127.0.0.1]:50453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr3BX-0000us-4J for submit@debbugs.gnu.org; Mon, 24 Apr 2023 16:53:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr3BV-0000ug-Jr for 62589-done@debbugs.gnu.org; Mon, 24 Apr 2023 16:53:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3BO-0004sS-W4; Mon, 24 Apr 2023 16:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Gy2pzpYX89rQAK5F6T0Wh3C84sYT/EGmIFPBWB0dAlE=; b=BgMGVpSd+4PtJ3tF5hyf HwGwZlup0p1PzwWs16vuKnkjvrcavFWhiBBpA6qBwi1WqC9xN03pGnkC8C+Ud7SCFZkAVa5EPLf0Y TbfJE1W9XghJuWQ28DHXdI0ZHSRaLrK1WabVHarNPlmGLC3NQ/wsPTj7w+5g7AXurXxzNjPeF31kH v2CaRz8/4+8PfXhusLq+XghrjALS/I5RaM2WuV6qvptVKmIugHjfUSMn/UvkkQy24fHODMaRWdQue FgnfO3IusYva4jXuotMG8JCSw1uG/5WysKpWiMhCvcKB6wGnGNYWgJKnt+ERuDviwnyHSDBWJZq54 qoeynS/6g+h8DQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pr3BO-0004DU-7o; Mon, 24 Apr 2023 16:53:10 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87ilefgbza.fsf@ngraves.fr> <20230401173239.26588-1-ngraves@ngraves.fr> Date: Mon, 24 Apr 2023 22:53:07 +0200 In-Reply-To: <20230401173239.26588-1-ngraves@ngraves.fr> (Nicolas Graves's message of "Sat, 1 Apr 2023 19:32:39 +0200") Message-ID: <87jzy10zpo.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: UNKNOWN X-Migadu-Spam-Score: -0.06 X-Spam-Score: -0.06 X-Migadu-Queue-Id: CBF103E9B1 X-Migadu-Scanner: in3.migadu.com X-TUID: 4kaTmz84zpZf --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Nicolas, Nicolas Graves 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 =E2=80=98with-imported-modules=E2=80= =99 instead of passing #:modules, and #$output instead of the now-deprecated =E2=80=98%output=E2=80=99). I also tweaked the commit log according to our conventions. Thank you, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: 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 --=-=-=--