From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sK1SMTysKF8KSgAA0tVLHw (envelope-from ) for ; Tue, 04 Aug 2020 00:30:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wIQkLTysKF9lJgAAB5/wlQ (envelope-from ) for ; Tue, 04 Aug 2020 00:30:52 +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 1022D9402D1 for ; Tue, 4 Aug 2020 00:30:51 +0000 (UTC) Received: from localhost ([::1]:50314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k2kqw-0003ts-FP for larch@yhetil.org; Mon, 03 Aug 2020 20:30:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k2jrO-0001Dg-CY for help-guix@gnu.org; Mon, 03 Aug 2020 19:27:14 -0400 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]:43685) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k2jrM-0007pK-Ku for help-guix@gnu.org; Mon, 03 Aug 2020 19:27:14 -0400 Received: by mail-io1-xd2b.google.com with SMTP id k23so40282369iom.10 for ; Mon, 03 Aug 2020 16:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=7sRcJVyjHv7UYKmf2RowqDSm/ahu1j6eW0VLrjVojx0=; b=vP4+r9SlohoZP70gxqVWEFhq/67RrCCV03V7TWIDtk7PHEaA7biz9MAjulaENVMEy4 eA9P4nnZJ1xhi7oCZr0ybQRiOEJFcFieU7d8+nZRFGA9LSphGsyyIlxtI1FBTtbRMw1T hnMKu4J5c+zTuUnNEl6VGkqiieugu9z0lhhkAEfdtYyBoLRPi0QqhWiwbQqVNC2GP8k9 j8WJMUzqDL24Sms1VSCPGnHqrraTlJIuinr+CFw609ON31yAtVEd/QSMEZ0uhUcsE4kw vlU6xEnQ8QxkoIuQ9rvuAerkFqrtYtajWjQoJ8lnXDjpMoEulfEmJ44pnKetTuSza1R4 CLqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7sRcJVyjHv7UYKmf2RowqDSm/ahu1j6eW0VLrjVojx0=; b=dq3fB+hPQmbxn+fOvj/noYXklvjI0gt+xdpcYbcgHmiLdG3x5+VE53eIu50mTTWsoA DjNeGBTYGybZ74R6zNqqgQl6sK6qQCHTMqdgJVg4WgqjhmD2F6cQsHuL0SBZRnbiVhjG ZB195hjMkC0LPgY9f2LiEv8iKOCmhpVS2cUrHq+IKlJ5aSfxcwbX15xvfKkVN1xOPoYG vzI4apgr+3KUhE5vQXqnuLD/XXCbYuz8Ec9NMyxj6/nzt3mBEldOEC53tLRe0SUTZdeg 2X5NjCGlzO2VQLpkZJERRQ1xqMos6BtVvOaq+4mSsiEPdROTDFx1MUCAn29DmgySXZVX tLpA== X-Gm-Message-State: AOAM530+yvDW2WFzG86qJuxgw74OI83vRvJ24afP8l43W9xtMObS4to8 870q/7QM8wgTHKK3FamjFgslmS+W+e60NJld+l/Yfw== X-Google-Smtp-Source: ABdhPJwHgWizDWeJ5IftLYJNgwkgWHk/fkLIE6h0gpZonyvp5fyS1dnaSY59ZgKtbjo3nfrWB+4tiTfYtFeOs/YEj68= X-Received: by 2002:a05:6602:2409:: with SMTP id s9mr2138162ioa.98.1596497230613; Mon, 03 Aug 2020 16:27:10 -0700 (PDT) MIME-Version: 1.0 From: hot12shots Date: Mon, 3 Aug 2020 23:26:59 +0000 Message-ID: Subject: Using --search-paths with multiple profiles To: help-guix@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=hot12shots@gmail.com; helo=mail-io1-xd2b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 03 Aug 2020 20:30:37 -0400 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=vP4+r9Sl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: +lw7DXuATt5Z Hi Guix, The Guix Cookbook chapter "Guix Profiles in Practice" [1] advises that, when one activates a profile generated from a manifest, environment variables like MANPATH won't be set automatically unless the packages that will consume them (in this case man-db) was also included in the manifest. There seems to be a Guix command tailor-made for solving this problem: `guix package --search-paths`. I am wondering if it would make sense to recommend that as the default way to ensure MANPATH, etc. are set correctly. I have had success replacing the cookbook's recommended boilerplate in my .profile with: eval \ $(eval guix package --search-paths=prefix \ -p /run/current-system/profile \ $(for p in $(guix package --list-profiles); do echo -n " -p '$p'" done) \ $(for p in $GUIX_EXTRA_PROFILES/*; do echo -n " -p '$p/$(basename "$p")'" done)) which on my system means: guix package --search-paths=prefix \ -p /run/current-system/profile \ -p ~/.config/guix/current \ -p ~/.guix-profile \ -p $GUIX_EXTRA_PROFILES/abc/abc \ -p $GUIX_EXTRA_PROFILES/xyz/zyz # etc. This properly sets the manpath etc., as the consuming packages (man-db and friends) are present in the included "built-in" profiles (first 3 `-p` arguments listed above). The only caveat I'm aware of is that the multiple `guix` invocations aren't instantaneous, so one might not want to use this if sourcing their .profile from .bashrc or equivalent, as it would add some init time to every shell invocation. Is this a safe solution? Is there ever a reason to explicitly source the `etc/profile` file of a profile as the cookbook currently recommends, rather than getting at its contents via `--search-paths`? Put another way, could a profile's `etc/profile` ever include setup code that `--search-paths` would miss? Thanks, Jacob [1]: https://guix.gnu.org/cookbook/en/html_node/Guix-Profiles-in-Practice.html