From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aEWDMwEBWmAWagAA0tVLHw (envelope-from ) for ; Tue, 23 Mar 2021 14:53:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sA1PLwEBWmBeagAAB5/wlQ (envelope-from ) for ; Tue, 23 Mar 2021 14:53:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 694D11477F for ; Tue, 23 Mar 2021 15:53:53 +0100 (CET) Received: from localhost ([::1]:36182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOiPo-0002DL-Fd for larch@yhetil.org; Tue, 23 Mar 2021 10:53:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOiIE-0002LW-2K for guix-patches@gnu.org; Tue, 23 Mar 2021 10:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49390) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lOiID-0008A4-Of for guix-patches@gnu.org; Tue, 23 Mar 2021 10:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lOiID-00072p-NX for guix-patches@gnu.org; Tue, 23 Mar 2021 10:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47344] guix-cookbook : (Basic setup with mafinests) Resent-From: Fulbert Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Mar 2021 14:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47344 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 47344@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161651070827008 (code B ref -1); Tue, 23 Mar 2021 14:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Mar 2021 14:45:08 +0000 Received: from localhost ([127.0.0.1]:60936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOiHL-00071Y-La for submit@debbugs.gnu.org; Tue, 23 Mar 2021 10:45:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:48852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lOiHJ-00071N-2d for submit@debbugs.gnu.org; Tue, 23 Mar 2021 10:45:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOiHI-0001Lu-Oo for guix-patches@gnu.org; Tue, 23 Mar 2021 10:45:04 -0400 Received: from vimdzmsp-sfwd02.bluewin.ch ([195.186.227.131]:55339) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOiHG-0007Uk-I2 for guix-patches@gnu.org; Tue, 23 Mar 2021 10:45:04 -0400 Received: from bluewin.ch ([85.5.44.62]) by vimdzmsp-sfwd02.bluewin.ch Swisscom AG with ESMTPA id OiHDlSxLCIn7COiHElzmVb; Tue, 23 Mar 2021 15:45:00 +0100 X-Bluewin-Spam-Analysis: v=2.4 cv=daFFYVbe c=1 sm=1 tr=0 ts=6059feec a=bLoAJnPGBKLbGpzEBMhwHQ==:117 a=RhqaMz7EtA_yR4BBwmQA:9 a=QEXdDO2ut3YA:10 a=Q_hwkIaQF7DZ1ZajMcoA:9 a=JOWeiY5itpwPQvuQ8dm/GawRuwE=:19 X-Bluewin-Spam-Score: 0.00 X-FXIT-IP: IPv4[85.5.44.62] Epoch[1616510700] X-Bluewin-AuthAs: fulbert@bluewin.ch Date: Tue, 23 Mar 2021 15:44:59 +0100 From: Fulbert Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="bNvcUvr18pO4B8TW" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfKfe/2kVOBvHeMOU4JPSDp5ffsEPoY4rF7rCvoaL650EIawhKDiRiJB7B6FCXbigXHLibginGbJmD2ewKDBrwaDwQS+NTccRiG6YOshyvHmafq97enrg vyZNFg2RL4/1hFuvmb8UsrBEd0UR8YrmXFF2z8i9hpyed+Xw2o8BuvprFQ8JnPxDibY8x5F9ti3rYg== Received-SPF: pass client-ip=195.186.227.131; envelope-from=fulbert@bluewin.ch; helo=vimdzmsp-sfwd02.bluewin.ch X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616511233; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lhEUjYwwbj8oB/7/wqhz/ErOoCAtxnJiggojDLUwTQc=; b=vBLQH/0i1JQb+P4KLMwJ9XAkTbeNvdjwek/Rb3XSYrtC18JaaLzOLa/NIhisUtpowijPpE eatRKyFklFjzvoksbhlQCB9eGEOS5fpemcCLi/SKNrTDcfe/gZ5jt/abms5Dg+cXVUUbdi /8lkTkq8FX2q9kbf6LFbZQLLRzFA9M/uJbmAJzDmqV/qF6COnnVlN3zpCmDPcJMbb0IsLi 45wDsY2fntXrvSeIs9CTy1utiU3eagls2zweSzbBb+MkpXI3KRHwoOcLcXFTM7B6Qqf36q 4O89XQL2iWsImB9nTBU/Wdh3w61aCMAWKqJgKE7Qzj4PT8Po3VieDhthM8HNxg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616511233; a=rsa-sha256; cv=none; b=YvimXkap/KzHt/0GfUS2s5ea0Wl52d1hEX7ToE2uJPUqyDfnQ5tB+4gZEOovwdLbtDD854 ysrRGl691w54nVUcofwkMeyAgmJJLQIx1IuLaj/v+4lKgWF5NNrbu02livcPDavnpZ4pZq BvbWPYz5W3O9mIn9ING3m33la9iaZwYEoj37/AUPx9NPQVQTBuWPqwDmqNcQg8GXNxLvGu dsmFbB+dKeyOaYs2i7uqlgs/erh3BgDSD/RpRMwhwYHRCk9PwfRxTueTX0xj0NW+nGr/gr abnCTFYpceRrJD0G014PuwO4RZhd/+4h5Ui6JIuT1H9eXT5RMLRtqavQYFCpgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 694D11477F X-Spam-Score: -1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: /opjxdBAeTHr --bNvcUvr18pO4B8TW Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit … with the patch this time ! Hello, I propose those changes to (Basic setup with mafinests) as they are more likely to produce the exptected result. Probably the `combined` search-paths profiles were not available at the time of writing this section ?! Although It works well for me, I'm not 100% sure it should make it to live guix-cookbook. Not sure either if filtering-out $HOME/.config/guix/current is necessary. Anyway, I thought it was worth proposing :) Best regards, Fulbert --bNvcUvr18pO4B8TW Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="guix-cookbook.texi.patch" Content-Transfer-Encoding: 8bit >From 352b4bbbec7acd51d01a05f11b0e59bbe8b2b2cb Mon Sep 17 00:00:00 2001 From: Fulbert Date: Tue, 23 Mar 2021 14:26:15 +0100 Subject: [PATCH] =?UTF-8?q?doc:=20cookbook:=20modify=20=E2=80=9Cenable=20a?= =?UTF-8?q?ll=20profiles=20on=20login=E2=80=9D=20examples.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix-cookbook.texi (Basic setup with mafinests): “enable all profiles on login” examples changed from etc/profile sourcing to combined profiles eval's. --- doc/guix-cookbook.texi | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/doc/guix-cookbook.texi b/doc/guix-cookbook.texi index 1cddaa7faf..81339f16b3 100644 --- a/doc/guix-cookbook.texi +++ b/doc/guix-cookbook.texi @@ -2531,14 +2531,13 @@ although you'll probably have to filter out @file{~/.config/guix/current}. To enable all profiles on login, add this to your @file{~/.bash_profile} (or similar): @example -for i in $GUIX_EXTRA_PROFILES/*; do - profile=$i/$(basename "$i") - if [ -f "$profile"/etc/profile ]; then - GUIX_PROFILE="$profile" - . "$GUIX_PROFILE"/etc/profile - fi - unset profile -done +search_paths_profiles() @{ + for p in $(guix package --list-profiles); do + [[ "$p" != "$HOME/.config/guix/current" ]] \ + && echo -n "-p $p " + done +@} +eval $(guix package $(search_paths_profiles) --search-paths=suffix) @end example Note to Guix System users: the above reflects how your default profile @@ -2548,14 +2547,13 @@ Note to Guix System users: the above reflects how your default profile You can obviously choose to only enable a subset of them: @example -for i in "$GUIX_EXTRA_PROFILES"/my-project-1 "$GUIX_EXTRA_PROFILES"/my-project-2; do - profile=$i/$(basename "$i") - if [ -f "$profile"/etc/profile ]; then - GUIX_PROFILE="$profile" - . "$GUIX_PROFILE"/etc/profile - fi - unset profile -done +search_paths_profiles() @{ + for p in $(guix package --list-profiles); do + [[ "$p" =~ (my-project-1)|(my-project-2)|(…) ]] \ + && echo -n "-p $p " + done +@} +eval $(guix package $(search_paths_profiles) --search-paths=suffix) @end example When a profile is off, it's straightforward to enable it for an individual shell @@ -2575,8 +2573,11 @@ It contains the same variables you would get if you ran: guix package --search-paths=prefix --profile=$my_profile" @end example -Once again, see (@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}) -for the command line options. +Note that you can also use this option to compute +@emph{combined --search-paths} of several profiles, as illustrated in the +previous @samp{~/.bash_profile} example. + +Once again, see (@pxref{Invoking guix package,,, guix, GNU Guix Reference Manual}) for the command line options. To upgrade a profile, simply install the manifest again: -- 2.31.0 --bNvcUvr18pO4B8TW--