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 M4jgOLu/SWAPYgAA0tVLHw (envelope-from ) for ; Thu, 11 Mar 2021 06:59:07 +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 oC8QNLu/SWAXHAAAB5/wlQ (envelope-from ) for ; Thu, 11 Mar 2021 06:59:07 +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 414C727356 for ; Thu, 11 Mar 2021 07:59:07 +0100 (CET) Received: from localhost ([::1]:57112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKFHm-0004Ez-Dh for larch@yhetil.org; Thu, 11 Mar 2021 01:59:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKFHH-0004Cy-8e for help-guix@gnu.org; Thu, 11 Mar 2021 01:58:36 -0500 Received: from zm-mta-out-3.u-ga.fr ([152.77.200.56]:51324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKFHF-0001Cc-B3 for help-guix@gnu.org; Thu, 11 Mar 2021 01:58:35 -0500 Received: from zm-mta-out.u-ga.fr (zm-mta-out.u-ga.fr [152.77.200.53]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 16DB04156A; Thu, 11 Mar 2021 07:58:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=univ-grenoble-alpes.fr; s=2020; t=1615445912; bh=8hRXaOQUUiVY5ccuaT93s9J0wVJPbi19vQKgOPTAz0o=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=UlZZp7QlxD1sDimEXHOIHUifd1cUCpNrRjhXONG1WYnh2oKwswA2nddDwAaCAm0rl BkeQkZnuHb0IdocLmyuq0iMgQNBgzqO47SyT81DumxMP9MRkOR1mpT1GJe2zs+P0hr 2UZZXzw0h8uQ15S0Or+/p6Tk/H0uwb4B+uuzt3YUp/RhedjMqq/OeHi4ricId5X26X mM3WuV0Q4m5nCzl1bpnosrpfQyWSWpxzVMl5SCYxjZHOWmyNw673OtgZQZWZKywJ0T KPMQpopkELSBKDbg9yYP3XR4R+TYjORr3pYdx85KChAB2BY865UxN4Th5ebeTMa3Y9 FryzzwHe2Ujfg== Received: from smtps.univ-grenoble-alpes.fr (smtps3.u-ga.fr [195.83.24.62]) by zm-mta-out.u-ga.fr (Postfix) with ESMTP id 0FD4F80657; Thu, 11 Mar 2021 07:58:32 +0100 (CET) Received: from [192.168.1.69] (i15-les01-ntr-62-34-148-47.sfr.lns.abo.bbox.fr [62.34.148.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bouttiep@univ-grenoble-alpes.fr) by smtps.univ-grenoble-alpes.fr (Postfix) with ESMTPSA id F0ED54005E; Thu, 11 Mar 2021 07:58:31 +0100 (CET) From: Pierre-Antoine Bouttier Message-Id: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: nix shellHook equivalent for guix environment? Date: Thu, 11 Mar 2021 07:58:31 +0100 In-Reply-To: <87eegnhwzx.fsf@yoctocell.xyz> To: Xinglu Chen References: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr> <87eegnhwzx.fsf@yoctocell.xyz> X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Greylist: Whitelist-UGA SMTP Authentifie (bouttiep@univ-grenoble-alpes.fr) via submission-587 ACL (100) Received-SPF: pass client-ip=152.77.200.56; envelope-from=Pierre-Antoine.Bouttier@univ-grenoble-alpes.fr; helo=zm-mta-out-3.u-ga.fr 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, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 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: , Cc: help-guix 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=1615445947; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=7XMPFpDvzZ+LTV172P14ry6DwVBzaCFIJScivt1HmC0=; b=k0ToWrt7EhQQxk49E8ohMeXJ+3EwTepNgm0fnChv8hMyBXT/9RZFDt6nwvOq+YUeCIqAZi Ndw2HmNW9xt/fWbTmUKyURdTjifN3BHotri/YCV7YfMJ5ENOklhSw/GYAzWn3QF2VxEc3l hWSoTJ2fCNTzaOTvhj6c7RCnNKWHpKMRcqGjisJT88pqYYpabcKQZpnNUgNGCM0QizXvxn Q97sF8sqAj89QjvwhnqJTI1HNoMv9qHm9jePvFRGXXTWOhgS7JHj0byTPq8tby3nf2baX4 F6c/jxOa+7bNspqN3RCOstyhTmLzJg+fYC4o0B49bBPuyI5AVcDAu/OSHBmsmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615445947; a=rsa-sha256; cv=none; b=gdTq9qs/vS26SP6ILIOwxrGN4w1v2vcjn+Kufxr0noUUzl81Kzs8lMwn8Fcav5KPITXfL/ EFD9G5fUWJs0GBXFQxbkKbXHm5nTA+++hJvXMtfaxXEh6D3QD94q4uOn4h+hpNClOYuQV7 wkOIP2oGwuh108Zr6085Wz5CPg6EfdDp+GzN04ngEcex2+rNWr1y6Mg58JCBDurW4o2zvh hzszflIJG9TqozMzH46y4kRaxUgpIMh15L8bzfIWpZ5mnqPlwKXkmUrVGOmBg2KkUWrgmR 7IVmzdNkhUxtolePZWV88FMIgi+sCfdl3WUSLkd1QsnFpY6UXtzoOpiKe7OYFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=univ-grenoble-alpes.fr header.s=2020 header.b=UlZZp7Ql; dmarc=fail reason="SPF not aligned (relaxed)" header.from=univ-grenoble-alpes.fr (policy=none); 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: 0.21 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=univ-grenoble-alpes.fr header.s=2020 header.b=UlZZp7Ql; dmarc=fail reason="SPF not aligned (relaxed)" header.from=univ-grenoble-alpes.fr (policy=none); 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: 414C727356 X-Spam-Score: 0.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2Y0ceDOwY59N Hi, thank you for pointing this. I will check if it can fit my needs. Best --- Pierre-Antoine Bouttier GriCAD Research Engineer GriCAD - https://gricad.univ-grenoble-alpes.fr/ Batiment IMAG CS 40700 38058 Grenoble CEDEX 9 +33 4 57 42 18 66 > Le 10 mars 2021 =C3=A0 16:03, Xinglu Chen a = =C3=A9crit : >=20 > Hi! >=20 > On Tue, Mar 09 2021, Pierre-Antoine Bouttier wrote: >=20 >> Dear all, >>=20 >> 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? >>=20 >> 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) >=20 > 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. >=20 > There is also integration with Guix[2] so you could have an `.envrc` > file like this: >=20 > --8<---------------cut here---------------start------------->8--- > use_guix --ad-hoc git -L manifest.scm >=20 > echo "Environment created!" >=20 > [...] > --8<---------------cut here---------------end--------------->8--- >=20 > [1] https://direnv.net/ > [2] https://github.com/direnv/direnv/wiki/GNU-Guix >=20 > -- > Xinglu Chen