From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: native-search-paths and shepherd services (help wanted) Date: Tue, 11 Feb 2020 15:40:29 +0100 Message-ID: <87ftfh192a.fsf@gnu.org> References: <28115b77287fbf2a07036fa50a811971@waegenei.re> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: (Brice Waegeneire's message of "Sat, 08 Feb 2020 19:39:59 +0000") 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: Brice Waegeneire Cc: guix-devel@gnu.org, Guix-devel Hello, Brice Waegeneire skribis: > 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. Search paths are only used when building a profile, which is not the case here. I suppose you=E2=80=99d have to explicitly pass #:environment-variables to =E2=80=98make-forkexec-constructor=E2=80=99 to get the desired effect. HTH, Ludo=E2=80=99.