From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id YAfOH6tJSWDyfgAA0tVLHw (envelope-from ) for ; Wed, 10 Mar 2021 22:35:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id SLWgG6tJSWDYBgAA1q6Kng (envelope-from ) for ; Wed, 10 Mar 2021 22:35:23 +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 A8C3BB62C for ; Wed, 10 Mar 2021 23:35:22 +0100 (CET) Received: from localhost ([::1]:44164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK7QH-0002nJ-Sr for larch@yhetil.org; Wed, 10 Mar 2021 17:35:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK0Mv-0000Yd-RA for help-guix@gnu.org; Wed, 10 Mar 2021 10:03:25 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:48366 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK0Mt-0002v3-MG for help-guix@gnu.org; Wed, 10 Mar 2021 10:03:25 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1615388595; bh=6y+nQ5WgmfWAhiSxiEGAtVpv+Pw6tuW7+j49eG1Z2cE=; h=From:To:Subject:In-Reply-To:References:Date; b=EA4jFWfCmWTTBHemmHta0UzyvrNPURDh7cJTTINMGqNVjZuv7RlUAQYbmA1IC+f4o q5E5COx+9/pVXxpyYQ9YBUmhzYBuBMvmZ/sFZSME1Gi0nR7nTckoyMBTBV0FDWTVPQ j36OPdd4OYz1y4yoIftWwdQ31VVsa6fqIRhjrBwE= To: Pierre-Antoine Bouttier , help-guix Subject: Re: nix shellHook equivalent for guix environment? In-Reply-To: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr> References: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr> Date: Wed, 10 Mar 2021 16:03:14 +0100 Message-ID: <87eegnhwzx.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 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, FROM_SUSPICIOUS_NTLD=0.5, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 10 Mar 2021 17:34:47 -0500 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-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615415723; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=q/hecs0DYW+IqUPlB3gS12edZiJWoR1UXJ+2OUQcNtU=; b=WkKrViudBO4r670ncjqCOGaCNksSM35xCOhlq5TBeuO8vKcdQnIo4E0ikEfDf9vmTCl6bp b+Vnkx5R59PGuBGdyxw2tWPFvvWcjFFCEb4AKcJ66VAhREH2LlfEmT0AeKn9DbtpmRycLV 050SQEzTCdcfnPdQqbdEpV9LJHQBsyAyBxYdg48QgPJYWY+T8tkuL4E7J3UI6GG+jG8P6v avepU4YXqB/SF09swjtskVqHTPHu/dkS4ikIywHbdCFEAB4d+LQa20Gx/IGKT5afoOe68u FW/IYJcFyHBTBU+r/wtNhCsk7Pep6gcLQ405mDOhfN65gmwx3JqiPcsOI00npw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615415723; a=rsa-sha256; cv=none; b=ofcJNScFzMWtOQYKHzVU4LGZ6I34A7iCcsvY1NNTpJov58ov++mpmYdMEnzrvmB6Mbnp6R i66PQamjoWd1dxZXUiF94HQqaPCVUIyfXkFCgchXXrvY4VbMFZ8X8qDh1m04fgY9o94cpp 4ZeeOkBUXwMFJIcU7Mjz/W8h7Dm10+/eyT8ju+HZLbsf4tLq2lTTbBfPc305DirxhrAJ6R Sfskf9NpHdA4c01gl4vx3QSRfMx1C0EKSnTzUNjp6zS+7sevK68Jgbpu60RJ0uXQUOGLn5 BcliAz8W3kEdd3A3UO/Y32CsIhLxdBcYnZ93e5kTXP0zCrFKmU8ZpmyVaPHypg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=EA4jFWfC; 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-Migadu-Spam-Score: -2.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=EA4jFWfC; dmarc=pass (policy=none) header.from=yoctocell.xyz; 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-Migadu-Queue-Id: A8C3BB62C X-Spam-Score: -2.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4vZpsHgXrvpm Hi! On Tue, Mar 09 2021, Pierre-Antoine Bouttier wrote: > Dear all, > > Do you know if there is any equivalent to shellHook, available for the > nix-shell command, for setting up a guix environment through a > manifest.scm file? > > Or maybe another methodology with guix to have approximatively the > same behavior? (i.e. in a file that can be put under version control, > defining dependancies and also init commands to set up a guix > environment) I am not aware of a guix environment equivalent to shellHook, but I suggest you checking out direnv[1]. It allows you to setup an environment on a per-directory basis, everytime you enter a directory the content of the `.envrc` file will be run in your shell. There is also integration with Guix[2] so you could have an `.envrc` file like this: --8<---------------cut here---------------start------------->8--- use_guix --ad-hoc git -L manifest.scm echo "Environment created!" [...] --8<---------------cut here---------------end--------------->8--- [1] https://direnv.net/ [2] https://github.com/direnv/direnv/wiki/GNU-Guix -- Xinglu Chen