[Nix-dev] best process for building from source under development?
Corey O'Connor
coreyoconnor at gmail.com
Sat Mar 3 23:39:26 CET 2012
2012/3/3 Lluís Batlle i Rossell <viric at viric.name>:
> No no. You need the webEnv in packageOverrides, better. Then "nix-env -qa" will see
> it.
Even better! This is almost perfect. Thanks!
>> Which then add a .nix-profile/dev-env directory.
>> I am not sure if there is just a "rebuild .nix-profile" command.
>> nixos-rebuild appears to only rebuild the system profile.
> You can use "nix-env -u \*" too, that may be close to what you mean by rebuild.
It is.
Thanks again,
Corey
>> On Sat, Mar 3, 2012 at 7:07 AM, Mathijs Kwik <mathijs at bluescreen303.nl> wrote:
>> > I use myEnvFun for that in my ~/.nixpkgs/config.nix:
>> >
>> > webEnv = pkgs.myEnvFun {
>> > name = "webdev";
>> > buildInputs = [pkgs.stdenv pkgs.jruby165 pkgs.nodejs];
>> > };
>> >
>> > As you can see, I include stdenv there as well.
>> > You are correct that auto* is in stdenv, but you normally don't have
>> > the standard build environment loaded in your system/home profile.
>> >
>> > A myEnvFun gives you custom environments setup files under
>> > ~/.nix-profile/dev-envs, which contain environment variables and
>> > paths.
>> > You can source this file (I believe Arie Middelkoop also automatically
>> > added a shell script "load-[name]-env" that does this for you.
>> > Then every time you want to work on your project, you load that env
>> > and find all stdenv (and other packages you include) available to you.
>> >
>> >
>> >
>> > On Sat, Mar 3, 2012 at 8:27 AM, Corey O'Connor <coreyoconnor at gmail.com> wrote:
>> >> Hi All,
>> >>
>> >> Suppose I have a source directory for a product under development. I
>> >> would like to setup the same build environment nix-build will use. I
>> >> have tried setting the src attribute to the source directory. However
>> >> this causes the entire product to be rebuilt every time. I also tried
>> >> copying env-vars from a partial build to the development source
>> >> directory then sourcing this before the standard autoreconf,
>> >> ./configure, make process. This progressed farther but died trying to
>> >> locate autoheader which I would presume was in the standard build
>> >> environment.
>> >>
>> >> Am I missing something?
>> >>
>> >> -Corey O'Connor
>> >> coreyoconnor at gmail.com
>> >> http://corebotllc.com/
>> >> _______________________________________________
>> >> 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