Related to this question: nix-shell: how to specify a custom environment variable?
With this derivation:
stdenv.mkDerivation rec {
FOO = "bar";
}
FOO
will be available in the nix shell as an environment variable, but is it possible to load environment variables from an env file?