From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Chris Marusich <cmmarusich@gmail.com>
Cc: help-guix@gnu.org, guix-blog@gnu.org
Subject: Re: [Blog/Cookbook?] On multiple Guix profiles and manifests
Date: Mon, 14 Oct 2019 09:27:00 +0200 [thread overview]
Message-ID: <87sgnvrdmj.fsf@ambrevar.xyz> (raw)
In-Reply-To: <877e5854cj.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1711 bytes --]
Thanks!
> However, I wonder why nobody has implemented
> "guix environment --profile=/path/to/my/profile".
Note that there is the "--manifest" option to "guix environment".
This brings up another "pro" for manifest: Right now it's possible to
create environments out of manifests while it's not possible to create
environments out of profiles without Chris' hack.
A question that I believe has been brought up before: is it possible to
specify multiple manifests from the command line, such as to provide the
union of the manifests?
Even better: what high-level functions to manipulate manifests, such as
"manifest-union", "manifest-difference"?
Then from command line we could something like the following:
--8<---------------cut here---------------start------------->8---
guix environment --expression '(manifest-difference "manifest1.scm" \
(manifest-union "anti-manifest1.scm" "anti-manifest2.scm"))'
--8<---------------cut here---------------end--------------->8---
Thoughts?
> guix-profile-env()
> {
> if [ -z "$1" ]; then
> echo "usage: guix-profile-env PROFILE [CMD [ARG ...]]" 2>&1
> return 2
> fi
> local sh
> sh="${SHELL:-/bin/sh}"
> if [ -z "$2" ]; then
> "$sh" \
> -c \
> 'GUIX_PROFILE="$0" && . "$0"/etc/profile && exec "$1"' \
Shouldn't it be '"$1"/etc/profile'? And no "exec ..."?
> "$1" \
> "$sh"
> else
> "$sh" \
> -c \
> 'GUIX_PROFILE="$0" && . "$0"/etc/profile && exec "$@"' \
> "$@"
Can you explain why you need to repeat $@ here?
Cool hack, thanks for sharing!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2019-10-14 7:27 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-05 10:55 [Blog/Cookbook?] On multiple Guix profiles and manifests Pierre Neidhardt
2019-10-07 9:56 ` Todor Kondić
2019-10-07 15:17 ` Pierre Neidhardt
2019-10-07 14:05 ` Konrad Hinsen
2019-10-07 15:25 ` Pierre Neidhardt
2019-10-07 15:37 ` Konrad Hinsen
2019-10-07 16:17 ` Todor Kondić
2019-10-11 8:23 ` Ludovic Courtès
2019-10-11 15:16 ` Pierre Neidhardt
2019-10-11 16:51 ` Ricardo Wurmus
2019-10-12 8:34 ` Pierre Neidhardt
2019-10-12 23:08 ` Ludovic Courtès
2019-10-13 10:27 ` Pierre Neidhardt
2019-10-14 10:35 ` Pierre Neidhardt
2019-10-14 13:30 ` Ludovic Courtès
2019-10-14 4:38 ` Chris Marusich
2019-10-14 7:27 ` Pierre Neidhardt [this message]
2019-10-14 11:26 ` Konrad Hinsen
2019-10-14 11:49 ` Pierre Neidhardt
2019-10-14 14:53 ` Chris Marusich
2019-10-14 15:01 ` Chris Marusich
2019-10-14 15:39 ` Pierre Neidhardt
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgnvrdmj.fsf@ambrevar.xyz \
--to=mail@ambrevar.xyz \
--cc=cmmarusich@gmail.com \
--cc=guix-blog@gnu.org \
--cc=help-guix@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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.