-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lorri does not set IN_NIX_SHELL
when realizing derivations
#65
Comments
Some example code (even generated code?) for haskell development environments also used this to switch between building |
This is a little off-topic, but does direnv's |
There was a reason why we don’t set it which should be documented somewhere in the code or git blame. |
Just tried that, it doesn't seem to be any different?
|
Looks like we are setting it in two places: lorri/src/ops/direnv/envrc.bash Line 163 in dfbf9b3
lorri/src/logged-evaluation.nix Line 144 in b84602c
|
This seems to have the side-effect of, in Haskell projects, tricking nix-build into building Not sure what's the cleanest way to approach this, ideally instead of exporting As a band-aid, I've been using This is my { pkgs ? import <nixpkgs> {}}:
pkgs.haskellPackages.developPackage {
root = ./.;
} |
Describe the bug
In a regular
nix-shell
, builds are evaluated withIN_NIX_SHELL
set. This allows you to, for instance, use yourdefault.nix
directly, while adding some development dependencies when in a shell. Lorri doesn't do this, meaning expressions that work as expected innix-shell
may provide a different environment in Lorri.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Metadata
Additional context
None, really. This feels like an edge case you're unlikely to run into unless you're weird.
The text was updated successfully, but these errors were encountered: