From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: [Blog/Cookbook?] On multiple Guix profiles and manifests Date: Mon, 14 Oct 2019 09:27:00 +0200 Message-ID: <87sgnvrdmj.fsf@ambrevar.xyz> References: <87y2xzihqs.fsf@ambrevar.xyz> <877e5854cj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45649) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJul3-0000je-PZ for help-guix@gnu.org; Mon, 14 Oct 2019 03:27:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJul2-0007Uw-53 for help-guix@gnu.org; Mon, 14 Oct 2019 03:27:09 -0400 In-Reply-To: <877e5854cj.fsf@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Chris Marusich Cc: help-guix@gnu.org, guix-blog@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thanks! > However, I wonder why nobody has implemented > "guix environment --profile=3D/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: =2D-8<---------------cut here---------------start------------->8--- guix environment --expression '(manifest-difference "manifest1.scm" \ (manifest-union "anti-manifest1.scm" "anti-manifest2.scm"))' =2D-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=3D"${SHELL:-/bin/sh}" > if [ -z "$2" ]; then > "$sh" \ > -c \ > 'GUIX_PROFILE=3D"$0" && . "$0"/etc/profile && exec "$1"' \ Shouldn't it be '"$1"/etc/profile'? And no "exec ..."? > "$1" \ > "$sh" > else > "$sh" \ > -c \ > 'GUIX_PROFILE=3D"$0" && . "$0"/etc/profile && exec "$@"' \ > "$@" Can you explain why you need to repeat $@ here? Cool hack, thanks for sharing! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2kI0QACgkQm9z0l6S7 zH+tjggAlOGXv7lw54EmISG0HI/OI+OGVBgDYEpci/uhksSYWDV7hZ/aHzQpALxB RCiPA9mYDa7ZQhdAbbbB58roodXHGxlSL9OBvefaPLz1zC8TzuWMEzUNoCiZuKXG yjH5d2unmRMJgdNj9Lm2H4zUK+QTXSTrfwlBPhFJUYLjudIOnSJG/zjSQza9ZeZu jhL3cY3eIzTWAn9eutpD/gVzwgMum+7b0NKfH3KQWEkiYf9o/su3/PH61MTsq5vY 87ZONI8Pthzyk6HcgjDeJ0whnOxVO6DcBExGQHQgfmPv5gW8yRBvCNjPIt6UFVT+ dkTapx/2//6DoH462TBG46GsmDS1RA== =azB7 -----END PGP SIGNATURE----- --=-=-=--