From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GNXCBUDCkWOgYAEAbAwnHQ (envelope-from ) for ; Thu, 08 Dec 2022 11:53:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SNzrA0DCkWPzhQEAG6o9tA (envelope-from ) for ; Thu, 08 Dec 2022 11:53:52 +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 CFA2E85C7 for ; Thu, 8 Dec 2022 11:53:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3EWV-0002TR-GL; Thu, 08 Dec 2022 05:53:03 -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 1p3EWT-0002T9-Mc for help-guix@gnu.org; Thu, 08 Dec 2022 05:53:01 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3EWR-0007Br-Sl for help-guix@gnu.org; Thu, 08 Dec 2022 05:53:01 -0500 Received: by mail-wr1-x42f.google.com with SMTP id h7so1141124wrs.6 for ; Thu, 08 Dec 2022 02:52:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ofJLJyjku+16n9wXBi4Z3GSy2jxZ4DvG/RyHIKrUqKM=; b=fZ+D/2Sgzv23ss91PYCGpj6qFcGJJK+l7AmhpilNt3PCGKf/gUd+p60iLZTklVFh4V rqBhvfTH7PCMyE9LpwffQ9ueFgdWc6gznfce12jM7GlfgYHo1pZZw7A5o/m4h2GdtOoN ztgPNilwnhubCCvyzCynTswvMKT5RAXKfgC7ohSbyoicb3xDWa2dOONmPVU47syLo2TY oEoAkIklVvcRpbPoLlfI+EhTP/AOu1umHQi9cEInwZsWTynPZeOB+DG0OYBFbFR+SNcR +U/jfdUZ3RC8zDU/SFRHdeagNUWoXzegQffcSObtcySZZ/n7ARaeMSq/J6fMUZSDfcFN 9+0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ofJLJyjku+16n9wXBi4Z3GSy2jxZ4DvG/RyHIKrUqKM=; b=NLnsmCohLy9ZPdXQp77ixmlTuAv81gdVJaRRo5yI5pSt69tmd0ObDg83PK5ki4A/ai +zuSkB8AYoovy2Az+qqAXKZmDMyRaYnjFqEjbx7wOH/kMwG2NBf/QacPAzthRQs0YPDT vG6LVGi66zGpUsOZ95p2UnMc18QrNMbV0INzEyZ/D/Jxabw06B5kIuudLUzbwbd3JQi2 TOZbc26vMD5e3D75+9uSESQDNFnucbDcQWTZ0wBDOeUwxUZTI8KPSKsmbP2lOHYtbt8u 30SIgIp2hjRRfRtMU/tPIukxy5sP/3mxJ/OfgqhLe7D741Xw0Svt+wDas3IHQnXvLMJ/ RzvA== X-Gm-Message-State: ANoB5plfEOYUieamZ8aCX9F0MWnwkRfJbI8V4zcwG26phDmkNzEVZK3v /X4wKPE2JacAddHBcgpBAbo+Pkzd+ns= X-Google-Smtp-Source: AA0mqf7n55V5/61IXOlXDf47Tcd+mMgDykBNGBWd+3yKXBcuP8+l1syiQi6IlwsGz/zkNzRf6Pz1ng== X-Received: by 2002:a05:6000:1f05:b0:232:be5d:3638 with SMTP id bv5-20020a0560001f0500b00232be5d3638mr302886wrb.1.1670496775496; Thu, 08 Dec 2022 02:52:55 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id b18-20020a05600010d200b002423a5d7cb1sm18846110wrx.113.2022.12.08.02.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 02:52:55 -0800 (PST) From: zimoun To: Peter Polidoro , "(" Cc: help-guix@gnu.org Subject: Re: Using Makefile to run guix shell? In-Reply-To: <87edtbdpmo.fsf@polidoro.io> References: <874ju7fe2a.fsf@polidoro.io> <87zgbzdy4g.fsf@polidoro.io> <87edtbdpmo.fsf@polidoro.io> Date: Thu, 08 Dec 2022 11:44:05 +0100 Message-ID: <86ilimgop6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42f.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: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670496831; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ofJLJyjku+16n9wXBi4Z3GSy2jxZ4DvG/RyHIKrUqKM=; b=lJNstri/ELaQ/ILcVMHXP+RIkBitFswMWvcoI5BXt4iuXHtn4WYouIBmAs4Dt6K+XI37nf 5sLQXWnYbXmewwwl64KeNN9NBIVWie87JVleXpERXQZmYr1iOfNNyH9eMgw1SSOAIN6/Kt L1UIq55V4mLGjYGd4khSHFZ6Z6B5bVILoNfNAMM4krnioyMEuPhPhITYgHzGPBgRXKAmS1 U+0lhXKGO2y9xUtkgzc37bs7ApbYnajNZ3fikvzNmWyRPZliqqGSCHKSl9QvS+GKWZ8cEW pUi/NmLcmE1wJh9e5TWnvYwRjmvrFg/wsQI9bOjxo7cMDZOKCDb6qnOdN725TA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670496831; a=rsa-sha256; cv=none; b=AaAvh1t7IUOB3o3z/ekWZwTxbd+rcflK+nbal7lozOhTbKMHLkqhmCqBVvPNZBB3Cveku5 fQiF11eujrjtBxqmxesGQBce98kB1d1P19C2TVC8mykSdRi6+/r5QrXzMwpZNeBziIGp+S 8ki1yP1tx1bczGIjNc7kDm/C4YkI/6u1H7RG+RFJx1F+JJHUV7aZ+76kUl5Pxg5lHhRFPu 2d6LikwctB0A8YLp4BzzjrgvaCaxCvYZ32mlhThrj/T3GzTKhyca4QtlOrmx0QXHEjpfqT FkGofqMivpLR1R2lNasONqafrO8SNAN6cHOEtDCCk4d5JEuAqfyhn2YG+X1Ueg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="fZ+D/2Sg"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -2.96 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="fZ+D/2Sg"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: CFA2E85C7 X-Spam-Score: -2.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: eqweVYnMa5Eg Hi, On Wed, 07 Dec 2022 at 13:27, Peter Polidoro wrote: >> Why not just do: >> >> guix shell -- make metadata > > I do like the idea of not making it depend on guix. [...] > I guess I am just curious how other people manage such long=20 > commands? Quoting [1], I have a =E2=80=9Cgenera= l=E2=80=9D script (named guixify) under ~/.local/bin/ which roughly reads: --8<---------------cut here---------------start------------->8--- #!/bin/sh guix time-machine -C channels.scm \ -- shell --pure \ -m manifest.scm \ -- $@ --8<---------------cut here---------------end--------------->8--- where manifest.scm and channels.scm are kept with the Git project. I prefer to pin a specific Guix revision to avoid bad surprises. :-) Well, in a project, I just run: guixify make # run make using the Guix environment guixify # enter in the environment Well and if I need a more complex command-line invocation specific to the project, I have Shell scripts with the Git project; for instance guix-serial-shell.sh --8<---------------cut here---------------start------------->8--- #!/bin/sh guix time-machine -C guix/channels.scm \ -- shell -m guix/manifest.scm \ --container --expose=3D$(PORT) picocom \ -- $@ --8<---------------cut here---------------end--------------->8--- where I try to decouple what requires Guix and what not. Well, I have not tried, but the idea is then to run: $ guix-serial-shell.sh make serial-shell where the Makefile contains the rule: serial-shell: picocom -b 9600 -f n -y n -d 8 -p 1 -c $(PORT) (well, adapting for PORT :-)) Other said, in general, I have a Git repository which looks like . =E2=94=9C=E2=94=80=E2=94=80 COPYING =E2=94=9C=E2=94=80=E2=94=80 guix =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 channels.scm =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 extra =E2=94=82=C2=A0=C2=A0 =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2= =94=80 packages.scm =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 manifest.scm =E2=94=82=C2=A0=C2=A0 =E2=94=9C=E2=94=80=E2=94=80 other-script.sh =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 serial-shell.sh =E2=94=9C=E2=94=80=E2=94=80 Makefile =E2=94=9C=E2=94=80=E2=94=80 README =E2=94=9C=E2=94=80=E2=94=80 src =E2=94=82=C2=A0=C2=A0 =E2=94=94=E2=94=80=E2=94=80 code =E2=94=94=E2=94=80=E2=94=80 tests =E2=94=94=E2=94=80=E2=94=80 stuff And the guixify scripts from above contains guix/manifest.scm and guix/channels.scm instead. :-) Well, I try to keep Makefile working without Guix. And usually, the folder guix/extra contains some packages that I use via --load-path, for instance, guix-serial-shell.sh would have: guix time-machine -C channels.scm \ -- shell -m manifest.scm \ --load-path guix/extra \ --container --expose=3D$(PORT) picocom \ -- $@ 1: https://yhetil.org/guix/86wn9puqj7.fsf@gmail.com HTH simon