[Nix-dev] "nix-env -i sdl-env" trouble

Bjørn Forsman bjorn.forsman at gmail.com
Sat Feb 23 12:20:13 CET 2013


On 23 February 2013 12:06, Vladimír Čunát <vcunat at gmail.com> wrote:
> On 02/23/2013 11:15 AM, Bjørn Forsman wrote:
>>
>> 2) I changed the name to "sdl-env" but it's no good:
>>
>>    [bfo at nixos:~]$ nix-env -i sdl-env
>>    error: selector `sdl-env' matches no derivations
>>
>> Hm. Doesn't my nix-env read ~/.nixpkgs/config.nix?
>
> I added your code int o my ~/.nixpkgs/config.nix
>
> $ nix-env -iA sdlEnv --dry-run
> (dry run; not doing anything)
> installing `env-sdl'
> these derivations will be built:
> [...]
>
> OK now? I don't use it myself so didn't realize that myEnvFun changes the
> name :-)

Actually, it doesn't work for me:

  $ nix-env -iA sdlEnv
  error: attribute `sdlEnv' in selection path `sdlEnv' not found

But, I've found out what the problem was now (thanks to aristid on
IRQ). Turns out that myEnvFun puts env- in *front* of the name, not
after (like I assume it did before):

  $ nix-env -qaP \* | grep sdl
  nixos.pkgs.sdlEnv                     env-sdl

So by running "nix-env -i env-sdl" (not sdl-env) it works!

Best regards,
Bjørn Forsman


More information about the nix-dev mailing list