From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kLTKLHh6l2NJkAAAbAwnHQ (envelope-from ) for ; Mon, 12 Dec 2022 20:01:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id VFe2LHh6l2OssQAA9RJhRA (envelope-from ) for ; Mon, 12 Dec 2022 20:01:12 +0100 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 5BF78CEB for ; Mon, 12 Dec 2022 20:01:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4o2c-0000EE-3O; Mon, 12 Dec 2022 14:00:42 -0500 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 1p4o2U-0000CZ-Rf for help-guix@gnu.org; Mon, 12 Dec 2022 14:00:35 -0500 Received: from koszko.org ([93.95.227.159]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4o2S-0002DP-8j for help-guix@gnu.org; Mon, 12 Dec 2022 14:00:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=koszko.org; s=mail; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XELQb1mR1pooSkDoXOqqHJQHRBS23fRAK03uekJqVMo=; b=XvhxMrqQXgR/SGWH/f3YY1Pyie lvlbtw8gDsmsudIFHTGjlJ5SlMQJOSd5A+ga/ywq5YtZoWK0ESRVr8F03dnOm/yT65MWR2XAWOI45 V41SWrSsNJSIt1dZLbzt/zr7J/yPvm7M91PLpdyh1BXSKkEKvkg6shGjT2dkawbsK6UNt2Jh3IRar QrgFxIyfojpGoQJGG3u0G57kl/UUifl5kjcjcuKXrPPqYsNm9c30RaFoQOT9KYmCFEleFNAWrXils cCyj86lHpjvchQ0dufO71YDzxGI8RSQZtO2vyTHJalo0igf1tlZI0BO965uQU9EQ06FOHeqHAhPO0 z2/CGeUD1PB5cvIyELZEX6u5spHOJO4aIAtCJqnpkxZPbeUuFe12xXD42IZfgeXjN6tiMBLrAD1ck cWdEFcdRlor1s97xPTUfJzJvKNnFnX3R+sAqDlBsudY41Nr2mkIteSZiSZvLTLlXgOuqibp5OEnGK tQdOa+JRjCoadbSjMke2pmW39jMIJk/FOpvyiCllMvul60j4AbP+FP5V903q8WkAtFKElUFSXFdeL OCjXIOXkGKq4bVH5uZKIRD2ZlgykOfPlP73RnNB+tXCmE6yMeqjshFTJSLuuHdawBCbuz5mh72p9h GVCrs0F5diALBc7B+l+wiqqiVg131nubXcnuu1L6M=; Received: from [77.252.47.239] (helo=koszkonutek-tmp.pl.eu.org) by koszko.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4o2K-0004u5-Un; Mon, 12 Dec 2022 20:00:25 +0100 Date: Mon, 12 Dec 2022 20:00:22 +0100 To: Peter Polidoro Cc: zimoun , "(" , help-guix@gnu.org Subject: Re: Using Makefile to run guix shell? Message-ID: <20221212200022.64024016.koszko@koszko.org> In-Reply-To: <87zgbs5vsi.fsf@polidoro.io> References: <874ju7fe2a.fsf@polidoro.io> <87zgbzdy4g.fsf@polidoro.io> <87edtbdpmo.fsf@polidoro.io> <86ilimgop6.fsf@gmail.com> <87a63ydk95.fsf@polidoro.io> <86r0x9g2bx.fsf@gmail.com> <20221208223048.00edc36c.koszko@koszko.org> <86359pa45q.fsf@gmail.com> <875yeke9qo.fsf@polidoro.io> <86fsdnl7hd.fsf@gmail.com> <87zgbs5vsi.fsf@polidoro.io> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/firqn+/H8qk0m0WD_=n6.XO"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=93.95.227.159; envelope-from=koszko@koszko.org; helo=koszko.org 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Wojtek Kosior From: Wojtek Kosior via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670871672; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=XELQb1mR1pooSkDoXOqqHJQHRBS23fRAK03uekJqVMo=; b=YDmTP7eJV0ZsX1GKxX94FOrRkRX2sAiPaSHwn8V9LF3XQziOMeuuaOiUnu3hVMxADX/W4e pq1DjYuVIZAz9FYzVsDirLWpoegaOPAJtbJCqc4TEHcgFSG6upfzHANA6I9WLrDhmtnowI /bgKwCQpuzgQY8H8ZJ6zCUOblrTDV4EcmS8Eg5j5KWNso66xmTXPoicW8IpOuGUIvFaxrY ro9QtJML6xCNShc7UoBTKbumlNEYV38e7qb876sPT0KakflOKr++P2nkELzxPz9jDx5pC1 8ZP5TgpO9KjLKOSgtZrxKx9S3TvX+WlQlH1QsBjPnb6M5WhaI3MsnW3zZtjU4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=XvhxMrqQ; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670871672; a=rsa-sha256; cv=none; b=dRhLHX1byYN6k6SbH9xUssdVfHftSmNvcglzAPSHasfMjDfKXzsb1axK6x70rtW3FpbfKF gtkHiHlamVPCY/hfrOsGx7OybDZuu45sAzATCAaIwIliqPpCczEFadMKOib4Cl4KXcNftN hewJJ5m7CxNBUs8JJA4sh5b2zmzcsgZ/+R/5xipCFcpMV5i2pUqMSyZI9jmOkWzCKKzdrs 3Wj4WECewdotHZiSi3OKw5d6/PhBYFqwRjKp2H+yFKe5GCCdWTiedkx76CTD7VkgHefYBd LUNXZWXvaR2AkAXNQOLFrAsR6+F6vanlQ2kuNnjS6Ex+kV0xmMMF2Fr0laGkaA== X-Migadu-Spam-Score: -2.86 X-Spam-Score: -2.86 X-Migadu-Queue-Id: 5BF78CEB X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=koszko.org header.s=mail header.b=XvhxMrqQ; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-TUID: Ip2rcEzr1Lvk --Sig_/firqn+/H8qk0m0WD_=n6.XO Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > So the true question is how to implement? If using Shell script =20 >=20 > Using shell scripts would mean one script per command? I usually=20 > have a set of commands that I would like to be able to run for=20 > every project. I would like to minimize the number of extra files=20 > in my project directory, so I would lean towards your Scheme API=20 > option. There's nothing that stops a shell script from exposing multiple commands. Consider for example the SysV init scripts. They typically utilize the `case` statement to support commands like "start", "stop", "status", etc. So you could craft a solution where from the root of your project you can run `./my-script.sh command1`, `./my-script.sh command2`, etc. Also, you mentioned you "would like to minimize the number of extra files" in your "project directory". Does that mean you don't actually mind creating more files in a *subdirectory* thereof? If you don't, how about putting command scripts under, say, `my-scripts/` and running them as `my-scripts/command1.sh`, `my-scripts/command2.sh`, etc.? Wojtek -- (sig_start) website: https://koszko.org/koszko.html PGP: https://koszko.org/key.gpg fingerprint: E972 7060 E3C5 637C 8A4F 4B42 4BC5 221C 5A79 FD1A Meet Krak=C3=B3w saints! #25: blessed Maksymilian Binkiewicz Poznaj =C5=9Bwi=C4=99tych krakowskich! #25: b=C5=82ogos=C5=82awiony Maksym= ilian Binkiewicz https://pl.wikipedia.org/wiki/Maksymilian_Binkiewicz -- (sig_end) On Mon, 12 Dec 2022 12:55:39 -0500 Peter Polidoro wrote: > zimoun writes: >=20 > > Because calling =E2=80=9Cguix serial-shell PORT=3D/dev/ttyUSB0=E2=80=9D= or > > =E2=80=9Cguix-serial-shell PORT=3D/dev/ttyUSB0=E2=80=9D is almost ident= ical. :-) =20 >=20 > Yes good point. >=20 > > > > So the true question is how to implement? If using Shell script =20 >=20 > Using shell scripts would mean one script per command? I usually=20 > have a set of commands that I would like to be able to run for=20 > every project. I would like to minimize the number of extra files=20 > in my project directory, so I would lean towards your Scheme API=20 > option. >=20 > > From my point of view, in this case, maybe an extension is a=20 > > heavy > > solution when a quick script would just smooth the workflow. =20 >=20 > Maybe it is too heavy a solution, but I do like the idea of just=20 > needing the channels.scm, the guix.scm, and maybe a Makefile for=20 > people who do not use guix. Or am I wrong and I would need more=20 > files than that? >=20 > I also like that a user could find information about the project=20 > commands using guix help. Can command extensions be grouped into a=20 > single sub-command so I would not feel like I am polluting the=20 > guix command namespace? Like could I run something like "guix=20 > project serial-shell PORT=3D/dev/ttyUSB0" or "guix project help" to=20 > get the set of project-specific commands that I added as=20 > extensions? >=20 > Is there some sort of extension bootstrap process where you run an=20 > intial command in the project directory every session to add the=20 > extensions, then the extensions are available for future commands? --Sig_/firqn+/H8qk0m0WD_=n6.XO Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQTpcnBg48VjfIpPS0JLxSIcWnn9GgUCY5d6RgAKCRBLxSIcWnn9 GuPnAP9aghdFTk8gWDBEWTLHsF/1et4EggOmGSuzOmusTHvjsgEAzQDskyXaw6tx hd/udcu3lTLYTcWKQ/eTztGOaqmDdQc= =kJuv -----END PGP SIGNATURE----- --Sig_/firqn+/H8qk0m0WD_=n6.XO--