unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Thompson <dthompson2@worcester.edu>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] scripts: environment: Allow mixing regular and ad-hoc packages.
Date: Mon, 26 Oct 2015 15:37:52 +0100	[thread overview]
Message-ID: <87r3kh4rwf.fsf@gnu.org> (raw)
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")

David Thompson <dthompson2@worcester.edu> 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 <dthompson2@worcester.edu>
> 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 ‘gnu-make-boot0’?

Other than that it LGTM!

Thanks,
Ludo’.

  reply	other threads:[~2015-10-26 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  2:58 [PATCH] scripts: environment: Allow mixing regular and ad-hoc packages David Thompson
2015-10-26 14:37 ` Ludovic Courtès [this message]
2015-10-29 12:58   ` Thompson, David
2015-10-29 20:18     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3kh4rwf.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).