nixos - Loading dependencies from nixpkgs-unstable with nix-shell -


i on nixos 16.09 , want use packages in nixpkgs-unstable / nixos-unstable.

using nix-channel --add, able add nixpkgs-unstable (user) channels , use install latest version of packages nix-env.

however, understand while nix-env depends on user-defined channels, nix-shell instead depends on nix_path environment variable, in case:

$ echo $nix_path  nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels 

so shows problem: nix-shell going use system-wide nixos 16.09 channel instead of user-defined nixpkgs-unstable channel.

right now, using workaround:

nix-shell -i nixpkgs=~/.nix-defexpr/channels/nixpkgs 

it not pretty me. recommended way of doing this?

is add like:

export nix_path="nixpkgs=~/.nix-defexpr/channels/nixpkgs:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels" 

to .profile? not pretty either.

welcome long-standing confusion nix-env , nix_path. explicitly stated, nix-env doesn't use nix_path, makes (i think) nix tool doesn't respect nix_path.

so, actual problem nix-env here, not nix-shell. i'll post bunch of issues on nix bug tracker this:

right now, using workaround:

so can see, isn't workaround. practice specify exact nixpkgs you'd use: roots channel version, channel version, upstream remote channel version, local git checkout or pinned git version.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -