From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: guix-shell? Date: Sun, 21 Sep 2014 13:25:46 -0400 Message-ID: <87iokgans5.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87fvgo3mlx.fsf@gnu.org> <87zjesgqc5.fsf_-_@gnu.org> <878umb30sx.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87vbpc8vgr.fsf@gnu.org> <878ulhmzv0.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87k3511hq7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVkte-00027q-Ea for guix-devel@gnu.org; Sun, 21 Sep 2014 13:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XVktX-0005uS-Qv for guix-devel@gnu.org; Sun, 21 Sep 2014 13:26:02 -0400 Received: from na3sys009aog112.obsmtp.com ([74.125.149.207]:58884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVktX-0005sS-IY for guix-devel@gnu.org; Sun, 21 Sep 2014 13:25:55 -0400 Received: by mail-qa0-f46.google.com with SMTP id f12so4487981qad.19 for ; Sun, 21 Sep 2014 10:25:48 -0700 (PDT) In-Reply-To: <87k3511hq7.fsf@gnu.org> 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.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel Ludovic Court=C3=A8s writes: > David Thompson skribis: > >> Should 'guix environment' create a new profile with all of the >> necessary packages in it? IIRC, nix shell doesn't do this, but I >> don't fully understand why and how. > > The thing is, all the packages in question must be registered as GC > roots, at least for the duration of the shell session (otherwise they > could disappear.) > I abandoned the profile approach and tried to implement something similar to what nix-shell does: Build all input derivations and set the environment variables that a builder would set. My primary reason for using the low-level derivations instead of high-level package inputs is that the derivations include information about all of the implicit inputs as well. However, building the correct environment has still turned out to be very difficult, and I'm stuck once again. My problems seem to stem from the disconnect between packages and derivations, and the implicit inputs of build systems. It's fairly easy to construct PATH and standard-search-paths, but I haven't been able to determine all of the other native search paths that a package might need in a build system agnostic manner. The derivation files do not store such paths, they are in the source code of the builder script. nix-shell has it easy because in Nix there is always a $stdenv/setup file that can be sourced that does the right thing. Since using derivations alone wasn't enough, I tried to use the native-search-paths of the package inputs. However, there is no interface to obtain all of the inputs for a package, including the implicit ones, in client-side code. Without the implicit inputs, it seems impossible to create an environment is the same as the environment of a builder. Do you have thoughts on how to overcome these issues? I'm stumped. I could very well be overlooking something. I hope the above paragraphs have made some sense. --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate