From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brice Waegeneire Subject: Re: native-search-paths and shepherd services (help wanted) Date: Sat, 08 Feb 2020 19:39:59 +0000 Message-ID: References: <28115b77287fbf2a07036fa50a811971@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:54467) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0VxW-0008Rk-5P for guix-devel@gnu.org; Sat, 08 Feb 2020 14:40:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0VxV-0002Qz-9v for guix-devel@gnu.org; Sat, 08 Feb 2020 14:40:06 -0500 In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Jonathan Frederickson Cc: guix-devel@gnu.org, Guix-devel On 2020-02-08 19:10, Jonathan Frederickson wrote: > I'm still not quite sure I have a good understanding of when > 'native-search-paths' applies and when it doesn't, but... at least > setting the env var directly seems to work in this case. I just learned about native-search-paths when looking into your issue so I may be off about how it works... What I understand is that native-search-paths add an entry to your /etc/profile when installed - for your default user profile it's $HOME/.guix-profile/etc/profile. In our case, when installed, minetest sets the environment variable MINETEST_SUBGAME_PATH so the binary know where to looks for the games. But when called directly, as it's the case in a shepherd service, the /etc/profile file isn't sourced so the environment variable isn't set. That's why we need to set it manually in the service.