[Nix-dev] customizing the profile and environment
Ben Franksen
ben.franksen at online.de
Tue Apr 8 22:55:43 CEST 2014
Vladimír Čunát wrote:
> On 04/06/2014 06:24 PM, Ben Franksen wrote:
>> How do I customize what gets put in my profile and environment?
>
> Currently there are no options. All paths are linked into user
> profiles/environments (but for a few hard-coded exceptions).
Ok, thanks.
> I plan some work on allowing to exclude some files from linking into
> user/system envs, but I can't say when or if ever that will be pushed.
I guess the perfect solution would be to make the list of directories to
merge into the user profile configurable from inside the nix expression, and
similarly with environment variables.
When (and if) you actually do this, please contact me, I might be able to
help.
> As for search paths... for the purpose of being in build inputs of other
> packages, one can define hooks that modify the environment of the
> builder (e.g. extend PATH, add library search paths). No such
> (automatic) option exists for user/system profiles (yet).
I found out about setup hooks, and I am currently employing them to amend
default search paths. For the moment I can live with that: it turned out
that I can avoid overlaps between installed (EPICS) modules by judiciously
removing some of the files that get installed by default (and which aren't
really needed). Also, there do exist debian packages for parts of what I'm
interested in; I learned a lot from looking at how they did that ;-)
Another thing I am considering is to provide users with a tool (including a
piece of shell script they can source) to get an environment in where they
have the stuff they need. It will be parameterized by a set of modules and
their versions, and I also plan to let them cache this input somehow in the
source tree, so they can easily re-generate the environment they need.
I just need a bit more proficiency with hacking in the nix language to get
there...
Cheers
Ben
--
"Make it so they have to reboot after every typo." -- Scott Adams
More information about the nix-dev
mailing list