From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45662) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isUVX-0006XH-J7 for guix-patches@gnu.org; Fri, 17 Jan 2020 11:30:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isUVW-00014R-Em for guix-patches@gnu.org; Fri, 17 Jan 2020 11:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1isUVW-00013T-BL for guix-patches@gnu.org; Fri, 17 Jan 2020 11:30:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1isUVW-0002Re-8U for guix-patches@gnu.org; Fri, 17 Jan 2020 11:30:02 -0500 Subject: [bug#39049] guix-install.sh: Create an init profile for better out-of-the-box experience on foreign distros Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Fri, 17 Jan 2020 17:29:10 +0100 In-Reply-To: (Prafulla Giri's message of "Thu, 9 Jan 2020 13:08:36 +0545") Message-ID: <878sm611yh.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Prafulla Giri Cc: 39049@debbugs.gnu.org Hello Prafulla, Prafulla Giri skribis: > Attached is a patch that I think improves the guix user experience on a > foreign distro. It creates a guix.sh init profile at /etc/profile.d (in t= he > same vein as flatpak with it's /etc/profile.d/flatpak.sh). I have been > using the init file on few of my friends computers with no regressions. That=E2=80=99s a great idea! Do you know how common the /etc/profile.d/*.sh convention is? > I have tried my best to emulate the commit-logs as seen from `git log > etc/guix-install.sh`. Please do let me know if I am doing anything wrong. > This is my first real contribution to a GNU project, ever. I am still a > n00b, and only have had experiences with GitHub based PRs so far, and sti= ll > have a lot to learn. Please forgive my klutzes. You did very well, no worries! (And it=E2=80=99s normal to need some time = to discover a project=E2=80=99s conventions when one joins it.) > From 527d82c66a1e80779f75a16cfdd65634d55f32c1 Mon Sep 17 00:00:00 2001 > From: Prafulla Giri > Date: Sat, 28 Dec 2019 12:48:52 +0545 > Subject: [PATCH] guix-install.sh: Create an init profile during installat= ion > > Create an init profile (/etc/profile.d/guix.sh) during installation for > better integration with foreign distros. This file, read by login-shells > sets a few environment variables (PATH, GUIX_PROFILE, GUIX_LOCALE, along > with XDG_DATA_DIRS) and makes guix-installed packages readily available > for the users. Other environment variables, as listed by `guix package > --search-paths=3Dprefix`, are also exported. > > Checks are in place to prevent the init profile from needlessly polluting > the user's environment. > > * etc/guix-install.sh (sys_create_init_profile): New function to create > /etc/profile.d/guix.sh init profile. Applied, thanks! Ludo=E2=80=99.