Skip to content
Snippets Groups Projects
Commit 65fd0080 authored by Tom Prince's avatar Tom Prince
Browse files

Set `NIX_PATH` in `shellHook` of `shell.nix`.

If `nix-shell` is run interactively on NixOS, in way that has loaded
`/etc/profile` (for example `docker exec <container> nix-shell`), then
`/etc/profile` will be sourced in the shell that nix-shell starts. That
overwrites the `NIX_PATH` set by `shell.nix`.

If we instead set `NIX_PATH` in the the `shellHook`, that always takes
precedence.
parent 4c2a30f1
No related branches found
No related tags found
3 merge requests!180merge develop into production,!177merge develop into staging,!162Set `NIX_PATH` in `shellHook` of `shell.nix`.
......@@ -3,7 +3,9 @@ let
in
{ pkgs ? release2105 }:
pkgs.mkShell {
NIX_PATH = "nixpkgs=${pkgs.path}";
shellHook = ''
export NIX_PATH="nixpkgs=${pkgs.path}";
'';
buildInputs = [
pkgs.morph
pkgs.vagrant
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment