help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Blog/Cookbook?] On multiple Guix profiles and manifests


From: Pierre Neidhardt
Subject: Re: [Blog/Cookbook?] On multiple Guix profiles and manifests
Date: Mon, 14 Oct 2019 09:27:00 +0200

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]