help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ‘guix pack’ automatic environment for Docker format


From: Ludovic Courtès
Subject: Re: ‘guix pack’ automatic environment for Docker format
Date: Thu, 15 Feb 2018 15:57:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hi,

Mathieu Lirzin <address@hidden> skribis:

> in order for the compilation environment to be fully ready I need to
> source the /gnu/store...-profile/etc/profile for things like
> CMAKE_PREFIX_PATH, LIBRARY_PATH, ...
>
> While one obvious available solution is to add an extra symlink ‘-S
> /etc/profile=etc/profile’ and then source it manually.

Actually, if you also do ‘-S /bin/bash=bin/bash’ and then run /bin/bash
in the environment, Bash will source /etc/profile.  That should be a
good short-term solution.

> I was thinking that maybe 'guix pack -f docker' could set the ‘Env’
> part in the ‘config.json’ [1] with the appriopriate environment
> variables automatically.
>
> I would like to know if it would be a good idea, and if it is easily
> doable?

It’s definitely a good idea, and I think it wouldn’t be hard to do.
Essentially, you’d have to follow the same approach as the one used for
etc/profile creation in (guix profiles).  See ‘profile-derivation’ as
well as ‘build-etc/profile’ in (guix build profiles).

HTH!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]