[Nix-dev] setting environment values.

Anderson Torres torres.anderson.85 at gmail.com
Thu Jan 29 01:22:41 CET 2015


2015-01-28 15:02 GMT-02:00 Tim Sears <tim at timsears.com>:
> Thanks Stewart. Do you happen to know if other nix commands (nix-shell,
> nix-build) use or ignore the extraCmds attribute? Or if any build phase uses
> it. I haven't found much documentation or code so far.
>
> I made some progress based on an earlier suggestion, by simply adding
> environment variables in the call to mkDerivation. The package is a library
> and want to propagate the variables to another library that depends on this
> one, and so on, downstream.
>

I think you can use setup hooks. Do a simple "git grep setupHook" on
nixpkgs tree, and you will find a lot of interesting setup scripts...

A good example is to set QTDIR on Qt4 scripts.

> On Wed, Jan 28, 2015 at 1:03 AM, stewart mackenzie <setori88 at gmail.com>
> wrote:
>>
>> add something like this:
>>
>>        extraCmds = ''
>>          export SOMEPATH_ERLANG=${erlang}/opt/path/to/libs;
>>
>>        '';
>>        };
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>


More information about the nix-dev mailing list