Open thufschmitt opened 6 years ago
I'm willing to propose a fix for this, but I'm not sure what the best solution is. I see two ways to handle this:
cd
into the root directory before running nix-shell
and then cd
back in the current directory before running the inner stack
, ornix.path
field to replace a given string (say $STACK_ROOT
) by the root directory of the project before running nix-shell
General summary/comments (optional)
When setting-up a stack project with Nix and
nix.path
refering to file with a relative path instack.yaml
, building from anywhere but the root of the project will cause the relative path to be resolved from the current directory instead of the root of the project (hence the file will probably not be found).Steps to reproduce
Expected
Both
stack build
should success without warningActual
The first
stack build
builds fine, but the second one fails withStack version
Method of installation
Nix
/cc @mboes