Nix, Stack, Path and Yesod Bin



I installed haskell stack and created a yesod template. When I run ‘stack exec - yesod devel’ I get a problem:

“yesod: stack: startProcess: runInteractiveProcess: exec: does not exist (No such file or directory)”

I understand that it does not find the yesod bin

the yesod bin is in /root/.local/bin

when I only do ‘yesod devel’ in the project directory it does not execute, but when I do ‘export PATH = $PATH:/root/.local/bin’ works.

I read that the stack runs through a nix-shell and that the nix-shell isolates the environment variables so that PATH is not available.

But it seems to me that if I can get the nix-shell to see the path /root/.local/bin it will work.

How could I do this?

P. S.

I want to do this reproducibly, that is, with nix integration enabled