From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MLMMH2THHWR3QgAASxT56A (envelope-from ) for ; Fri, 24 Mar 2023 16:53:08 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OOnnHmTHHWRAgwEAauVa8A (envelope-from ) for ; Fri, 24 Mar 2023 16:53:08 +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 3A8A92645B for ; Fri, 24 Mar 2023 16:53:08 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VuZ8Sm6m; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679673188; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=0ZEfljmylEWS+E/6SJg52wRQFxWAbpjvejYTTOxyg0Q=; b=Om8ULzOjd4wN/oawpNdmCOdBoc2/ojpihTljJcT6JVNmLS3jer0na19d53kUWzv1tN4zZu FZfK4SufwIoJ9sJwldKITRdyTJ7q0lOkdRt78T0sXT7p/G6JcD+qL/XA5UScWpBZOjXYqc xOIrR4WI6SIZGl5o55BRxekKV5wj261zcI1AaY0ZO9PvjG8e1H9+bi1EH0jbHfVn2kI/MY VwCCOyQii4n/rl9CGTf8Oed9LxIY+I8hp/DyPp/L/nw9G7vfR1Xa4ndSJub/MwmqqQlsi5 kMSFL++oi5dujDl+mvNZiDcqb/xEdvlqmqP6kiY/B9ykDai48OlHKPUJ/2r2lg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679673188; a=rsa-sha256; cv=none; b=bKk2YB7941/RxCHT06ZnRZbBD+n9j/oS7If59SuJnEm4lkmNMjQw65hON9nX2okbId2xgA 1r5VsQJBBQPgTt5CSJXMMHFUWx0Ve7vB/BOH2piVClR5nbTqnteCRYGX6EXmASnJv2FV1W 9A9y0op1hV0uQJPRTeTaIxhWPC/VfyuzwxBxCnoW3Ciqq7u2pB2QW7obNb5pKuEiAUKYPJ Zo16wyx7fv6dTaDzn1mFoqNBoNrYq91Y5O2is9zyvOcJCokNw+/FGIOyRxi+HyXduUeITo C6G2AkYYj8DaH/TTETvQrQncvccuaq1G+g5L6LsrVgMi5PpvAnwShufYmKVfVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VuZ8Sm6m; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfjaJ-0006g0-4N; Fri, 24 Mar 2023 11:44:07 -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 1pfjaG-0006VV-PZ for guix-devel@gnu.org; Fri, 24 Mar 2023 11:44:04 -0400 Received: from mail-qv1-xf2e.google.com ([2607:f8b0:4864:20::f2e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfjaC-000489-I9 for guix-devel@gnu.org; Fri, 24 Mar 2023 11:44:02 -0400 Received: by mail-qv1-xf2e.google.com with SMTP id m16so1789356qvi.12 for ; Fri, 24 Mar 2023 08:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679672637; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=0ZEfljmylEWS+E/6SJg52wRQFxWAbpjvejYTTOxyg0Q=; b=VuZ8Sm6minYwwjSVIL+eEKzNBGP/sxYqquOZ8jgThYHwnsLCGbVxGSN9AbQ+QF7xJH 3SeyRZNnEXp/WP5VC/tngrcoSszfkhjHiS6vluxtYMR0LErKYIfTyUWy9lGqgFIfZGTj 9PjGnUnOXS3ac1+iL7xGB1uXfwKtJIk7xWGzSPSujq8qkAA/U7PWEbyTaLYLiadXT8Hw P2/ADL0EEl7JhQE0jN1U2BWa/PdzZAfeaxA72U6PIlkGvfmegv4pWOYWS/8aTx8fmWnn naUU8m9VH2iw31j6/Pz71uFFr2Dti0qw+7/cnWDelRgOBzj6z8WgVW3mAWQrJYLAlWbV Xe/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679672637; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0ZEfljmylEWS+E/6SJg52wRQFxWAbpjvejYTTOxyg0Q=; b=rNkzDcq2+e51U8/9OTiEpVrKNCE2583CgNseTIgpvTtGfScw5W34V5xpsoxEygQUEW v48fFEevz585E5rLcfDdtruPQAjWgiaK8wTsdlp7I9dBHjBhbOOT33SnqE7C48tadqKl vI4cJ/gCAFSqGRBUwLaXJq4wWR7vKEbesa2nxmD9XDyPJaKMfW6CM6sTEawsPyEaHAYK YS/+Npxh+jwWkxU7abdphFgi1Ml99Quan662RabTWx5J8cDwvH8/WyTI3t9afbfXhPba Gg06hoWwvbLRwfziEXrucZUzx+kM+WOKBsjBWkQeBLDw725zGmQcVq03xfYo3tKEzDHF +JZQ== X-Gm-Message-State: AAQBX9clnnUo5RvBUJcIcT1WFTSWNMERB4yb/bOIldhHFBFr82Hohr61 qiSa0vPzqa/gQITpJjdDiDc5uG+jK2CcZNct2CDgw/jfbZOu2w== X-Google-Smtp-Source: AK7set/kP9S0H+of0iELuSoVQc++AJPoTNyDFLYLI6Cwm2L7XHRa9Bppu6iclCNuoi/wfRu9R/mBjxLps6mSljzuBAY= X-Received: by 2002:ae9:ef95:0:b0:745:811c:2aea with SMTP id d143-20020ae9ef95000000b00745811c2aeamr573074qkg.11.1679666766000; Fri, 24 Mar 2023 07:06:06 -0700 (PDT) MIME-Version: 1.0 References: <87y1nphzqy.fsf@elephly.net> <87bkkkhd4l.fsf@gmail.com> <87pm90ikou.fsf@elephly.net> <874jqcfa4o.fsf@gmail.com> <87cz4zijag.fsf@elephly.net> <875yaq1gd6.fsf@gmail.com> In-Reply-To: <875yaq1gd6.fsf@gmail.com> From: Sarthak Shah Date: Fri, 24 Mar 2023 19:35:51 +0530 Message-ID: Subject: Re: more package transformations: overrides To: Maxim Cournoyer Cc: Ricardo Wurmus , guix-devel@gnu.org Content-Type: multipart/alternative; boundary="000000000000edb6b405f7a5e414" Received-SPF: pass client-ip=2607:f8b0:4864:20::f2e; envelope-from=shahsarthakw@gmail.com; helo=mail-qv1-xf2e.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, HTML_MESSAGE=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: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: X-Migadu-Queue-Id: 3A8A92645B X-Spam-Score: -11.77 X-Migadu-Spam-Score: -11.77 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: SEnM8qWeNT85 --000000000000edb6b405f7a5e414 Content-Type: text/plain; charset="UTF-8" Hello, > By separate file or stdin your really mean stdin, correct? As in: > > --8<---------------cut here---------------start------------->8--- > guix something < args.txt or > echo "$args" | guix something > --8<---------------cut here---------------end--------------->8--- > > One note: since this mechanism could be generally useful, it should be > globally available (like 'guix build' options), for any 'guix' > invocation. > Actually, while using this shell script you could also pass a file directly i.e all of these will work: -----(shell)------ ./guix-shell-with-args /path/to/some/file-with-args ./guix-shell-with-args < /some/other/file echo "something from stdin" | ./guix-shell-with-args ------------------- If needed we could modify the script to only accept a file when a flag like --read-args-from-file is passed. It's a proof of concept, and I think some more work would need to be put in for actually implementing it since there are probably a whole class of possible bugs and errors that we have not considered. I agree that it could be beneficial to all guix subcommands; I can see myself using it with `guix package` for example. In this case we could perhaps have a subcommand `guix with-args ` which lets you invoke (install, package, build etc) with arguments from stdin or (optionally) a file. At this point, we have a real Scheme API we can use :-). If there's a > problem with using that, we should work toward improving it. > Yes, on further deliberation I realized that I'm basically writing a DSL atop manifests ^_^" If more people see a use for this suggestion, I could try writing a more polished shell script for `guix with-args` --- Happy Hacking! Sarthak --000000000000edb6b405f7a5e414 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,
By separate file or stdin your really mean st= din, correct?=C2=A0 As in:

--8<---------------cut here---------------start------------->8---
guix something < args.txt or
echo "$args" | guix something
--8<---------------cut here---------------end--------------->8---

One note: since this mechanism could be generally useful, it should be
globally available (like 'guix build' options), for any 'guix&#= 39;
invocation.
Actually, = while using this shell script you could also pass a file directly i.e all o= f these will work:
-----(shell)------
./guix-sh= ell-with-args /path/to/some/file-with-args
./guix-shell-with-= args < /some/other/file
echo "something from stdin&qu= ot; | ./guix-shell-with-args
-------------------
If needed= we could modify the script to only accept a file when a flag like --read-a= rgs-from-file is passed.=C2=A0It's a proof of concept, and I think some= more work would need to be put in for actually implementing it since there= are probably a whole class of possible bugs and errors that we have not co= nsidered.
I agree that it could be beneficial to all guix sub= commands; I can see myself using it with `guix package` for example. In thi= s case we could perhaps have a subcommand `guix with-args <subcommand>= ;` which lets you invoke <subcommand> (install, package, build etc) w= ith arguments from stdin or (optionally) a file.

At this point, we have a real Scheme = API we can use :-).=C2=A0 If there's a
problem with using that, we should work toward improving it.

=C2=A0Yes, on further deliberation I realized t= hat I'm basically writing a DSL atop manifests =C2=A0 ^_^"

If more people see a use for this suggestion, I could= try writing a more polished shell script for `guix with-args`

---
Happy Hacking!
Sarthak
--000000000000edb6b405f7a5e414--