From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] scripts: environment: Allow mixing regular and ad-hoc packages. Date: Mon, 26 Oct 2015 15:37:52 +0100 Message-ID: <87r3kh4rwf.fsf@gnu.org> References: <87bnbmxrmg.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqiuO-0001ep-I6 for guix-devel@gnu.org; Mon, 26 Oct 2015 10:38:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqiuJ-0005H8-A4 for guix-devel@gnu.org; Mon, 26 Oct 2015 10:38:00 -0400 In-Reply-To: <87bnbmxrmg.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Sun, 25 Oct 2015 22:58:47 -0400") 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson skribis: > Thanks to Leo for bringing up this missing feature on IRC. I've been > meaning to implement this for awhile but lacked motivation. ;) > > With this patch, you can freely compose packages whose inputs should be > in the environment with ad-hoc packages that should be added to the > environment directly. For example, here's how to create a Guix > development environment that additionally has strace: > > guix environment guix --ad-hoc strace > > The --load and --expression options are --ad-hoc aware as well. Yay, > composability! Swell! > From 6a1c0b03a0083cc521be5c28a438ed5ecafd2b9d Mon Sep 17 00:00:00 2001 > From: David Thompson > Date: Sun, 25 Oct 2015 22:33:33 -0400 > Subject: [PATCH] scripts: environment: Allow mixing regular and ad-hoc > packages. > > This patch changes the --ad-hoc flag to be positional. That is, the > packages that appear before --ad-hoc are interpreted as packages whose > inputs should be in the environment; the packages that appear after are > interpreted as packages to be directly added to the environment. > > * guix/scripts/environment.scm (tag-package-arg, compact): New > procedures. > (%options): Tweak the handlers for --load and --expression options. > (options/resolve-packages): Preserve package mode tag. > (parse-args): Tweak argument handler to use package tagging procedure. > (guix-environment): Apply ad-hoc behavior on a per package basis. > * doc/guix.texi ("invoking guix environment"): Document new behavior of > --ad-hoc. Could you add a test in guix-environment.sh based on the output of --search-paths, similar to what is already done with =E2=80=98gnu-make-boot= 0=E2=80=99? Other than that it LGTM! Thanks, Ludo=E2=80=99.