[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix-shell?
From: |
David Thompson |
Subject: |
Re: guix-shell? |
Date: |
Sun, 21 Sep 2014 13:25:46 -0400 |
User-agent: |
Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) |
Ludovic Courtès <address@hidden> writes:
> David Thompson <address@hidden> 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.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate