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 0Ft/J3ydHWTbMQAASxT56A (envelope-from ) for ; Fri, 24 Mar 2023 13:54:20 +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 ILE+J3ydHWRStgAAauVa8A (envelope-from ) for ; Fri, 24 Mar 2023 13:54:20 +0100 Received: from lists.gnu.org (unknown [209.51.188.17]) by aspmx1.migadu.com (Postfix) with ESMTP id 30AE3208CE for ; Fri, 24 Mar 2023 13:54:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pfgZQ-0003kN-Ug; Fri, 24 Mar 2023 08:31:00 -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 1pfgZN-0003jk-Gx for guix-devel@gnu.org; Fri, 24 Mar 2023 08:30:58 -0400 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pfgZ2-0007Ew-1e for guix-devel@gnu.org; Fri, 24 Mar 2023 08:30:51 -0400 Received: by mail-qt1-x830.google.com with SMTP id x1so1271792qtr.7 for ; Fri, 24 Mar 2023 05:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679661031; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=YsD1wuteE4qEsnD5gUhCZlk8m+K01GOB6vV7eHeJ2yE=; b=c03GWfaXpZaQuwrRG/QrP7IV9Q1TAQDIGybKtvkmyjID8A3XcGCEVTtnJ8yeo/xDvM mlLJNu+OxF44VJC1m5nRlBNQW7DDE/r5FykkfQgQL/MVPCmc5E3LNA8LqhEGSbqWpqF7 XYdwmPtEiIGG4uAWwN1BQIEgHRmicZKPDVq81eWbTJ2L139vQbf0lslt79Bg7NtMAKn8 8U39LxMRfZdAG2A23z4TFO6Q0d/bwgWScpNJP/dbPSUVojHbYn5SQZv+V25GhEGWi87o g1+wnpAkKpkHxnJTCjCBWppGObif119HqHoiC4I5ID5AC3DLpvthDCOUmPQlviwnJhCy CqGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679661031; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YsD1wuteE4qEsnD5gUhCZlk8m+K01GOB6vV7eHeJ2yE=; b=yaFCEL/qY888qoqiObwCyMEYescM0N+yLG4HyTQrjtaYGfmsbU7jBTIyYqEqGNdeeq 2SMlY5LMlL6jCjXd0XavMOJiburp4AHJwxQMirijsE/WvUwsFPIYqpdt0lfoX/UxLUmI lOZqta+UTApfugKbSND7KEQy//YZpD0RRyuxcdSLsIKizsw3k3dAFRsb1FaM8yXZvZ7c wdMSs4IuY8g8AHb0TfJqdu+auOYfKLRhCch5wvRcW/8rCfzjQD3CHv3N6nkoOV/JPhM9 e4Yo3wjeSvkkYHstZ84CbVG9DvL1zAXxqWSjViNi7PjAE/TTdNCTfKuTP8j3rJJ0Xr+0 Kfxg== X-Gm-Message-State: AO0yUKVrIaRD40F3tBSeXjrghkvw+p314K7wBwCfplnPX1AW968K3lGw wT19rCW6hj8pzlXrpI2P8au4gBGOMbqkwg== X-Google-Smtp-Source: AK7set+oQ01ukLqVlvEZAAB4MD48r2DfnopUYDpbvI/wq/wpsJ3N1vuHsm0rvwPBkSZ8NzQ1iKtF5g== X-Received: by 2002:ac8:7e94:0:b0:3e3:9117:66e8 with SMTP id w20-20020ac87e94000000b003e3911766e8mr4343106qtj.35.1679661030825; Fri, 24 Mar 2023 05:30:30 -0700 (PDT) Received: from hurd (dsl-155-54.b2b2c.ca. [66.158.155.54]) by smtp.gmail.com with ESMTPSA id t197-20020a3746ce000000b0074280fc7bd8sm14273741qka.60.2023.03.24.05.30.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 05:30:30 -0700 (PDT) From: Maxim Cournoyer To: Sarthak Shah Cc: Ricardo Wurmus , guix-devel@gnu.org Subject: Re: more package transformations: overrides References: <87y1nphzqy.fsf@elephly.net> <87bkkkhd4l.fsf@gmail.com> <87pm90ikou.fsf@elephly.net> <874jqcfa4o.fsf@gmail.com> <87cz4zijag.fsf@elephly.net> Date: Fri, 24 Mar 2023 08:30:29 -0400 In-Reply-To: (Sarthak Shah's message of "Fri, 24 Mar 2023 13:51:05 +0530") Message-ID: <875yaq1gd6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x830.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: 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: 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679662460; a=rsa-sha256; cv=none; b=IioaEsvt9Cp+Y7drEFG1JJHeqUWgYfcLXG4JFhcDNXOUvifyQ8yqe+PLU9beVhV2islS5H tovnGCe/S250suF7kaEKX+c6edkp1hNkFU2++8QM8uZI66Jp3M7jrErCCuuYoBPB+ndcNG vE04IJupQwWoohsPyM9GijTBLWz9oPGaqtxeG4C5lxalR4A/DemNS3UMwP/I93VxS8295Q jMGLTf4Y7cxIzLCyb9VvtLrLgusmoHY2j4yLhfElSzBPXJmaasavhkFPzQCkOhLmzmevix 8WQi3rNQbbgvxwnY5zO4FoOU7jwhDHByS3jtuE0mmTM3FeCXE7km3rAARalW3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=c03GWfaX; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679662460; 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=YsD1wuteE4qEsnD5gUhCZlk8m+K01GOB6vV7eHeJ2yE=; b=gSYwv/ECHV62lyjF7NKwaYOmaRwOGtg0J8f1jFGES9RKuJ8aebc1xV/H2T67h6Kow01zCA rdcEsnkGwfGgijUixCy1VDdDBjf1nxv/+wbzuI2FySu35B5+OVhp6DVhr44KlAUXfzHrqq Zinx7fs1boi+FxlOopiRF4/uh2CBNytX3tQXcKEgc+Z+ScUq8vkPhNtthhiS6CeHOtqXaB MIZWTgOy8tsFermjScP/SLEH+JoOz2eJiiFEr9OqJgR0Ppc/jelhFZiUipEnjOUPnC70dt LBChWf1ZYNR6FRJpxuvJw7j6Eu6kAVxP2EPpPnS3SYvleGr/LN1CY41tSjgXOQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=c03GWfaX; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.88 X-Spam-Score: -3.88 X-Migadu-Queue-Id: 30AE3208CE X-TUID: HIz6fIfA+C9X Hi! Sarthak Shah writes: > Hello! > Thanks for the CC, Josselin! > I like Maxim's idea of providing all kinds of arguments through a separate > file or stdin. > Here's a tiny proof-of-concept script implementing that: > -----guix-shell-with-args.sh---- > #!/usr/bin/env bash > argstr="" > while read line > do > argstr="$argstr $line" > done < "${1:-/dev/stdin}" > > guix shell $argstr 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. > ---------------------------------------- > This takes arguments from either a file or stdin. > It is also possible to provide an arg file and supply additional arguments > from stdin (i.e. echo "arguments" | ./guix-shell-with-args.sh > /some/file-containing-args will take arguments from both) > This functionality could be baked into guix shell itself, wherein if you > pass an argument (say "-a") it will read arguments from either a supplied > file or stdin. > (of course, some error handling needs to be added) > I would like to have a more lisp-y way of doing this, however, if I'm being > honest. > Perhaps we could add some code that goes over a list from stdin/files? > Input could potentially look like this: > '(C N (with-source pkgname src) (with-input a b)) > which would give > guix shell -C -N --with-source=pkgname=src --with-input=a=b > Wdyt? 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. -- Thanks, Maxim