[Nix-dev] how to use stdenv

Ganesh Sittampalam ganesh at earth.li
Fri Jan 2 19:46:10 CET 2015


On 31/12/2014 11:19, Bjørn Forsman wrote:
> On 31 December 2014 at 11:42, Ganesh Sittampalam <ganesh at earth.li> wrote:
>> Hi,
>>
>> https://nixos.org/wiki/Howto_develop_software_on_nixos talks about
>> including stdenv in a myEnvFun environment to get gcc etc.
>>
>> However gcc and a bunch of other standard build tools don't seem to be
>> part of stdenv any more:
>>
>> https://github.com/NixOS/nixpkgs/commit/328f7a621e0e2c37159e4cdd86fa279417fa3b9e
>>
>> ["stdenv: Remove propagatedUserEnvPkgs
>> Stdenv is not really intended as an installable package. Nowadays it's
>> much better to use "nix-shell -p" to get a build environment."]
>>
>> Is that wiki page out of date now? Is there a new recommended way of
>> getting the build tools into a myEnvFun environment now?
> 
> I can think of a couple of ways:
> 
> - include gcc etc. in buildInputs
> - use nix-shell instead of myEnvFun (like the commit message suggests)

Thanks - using gcc+binutils in buildInputs works fine for me. Should I
update the wiki page to note that you shouldn't use stdenv in myEnvFun
any more?

Cheers,

Ganesh



More information about the nix-dev mailing list