feat: add `devenv.flakeArgs` to avoid `--no-pure-eval`
This PR avoids --no-pure-eval in devenv-devShell.nix, in favor of "--override-input" "devenv-root" "path:.devenv/state/pwd".
@domenkozar What do you think?
I like the idea of making devenv more pure but I would avoid putting necessary steps into the .envrc file.
This way direnv becomes a dependency, currently it's just a nice tool to have.
In CI I would then either need to have direnv present or make the state directory manually.
The the moment it its enough to just run nix develop --no-pure-eval --command some-test-command
BTW. isn't devenv-root at .devenv and devenv-state would be .devenv/state?
I like the idea of making devenv more pure but I would avoid putting necessary steps into the
.envrcfile. This way direnv becomes a dependency, currently it's just a nice tool to have. In CI I would then either need to have direnv present or make the state directory manually. The the moment it its enough to just runnix develop --no-pure-eval --command some-test-command
This PR did not affect nix develop --no-pure-eval --command some-test-command behavior in general. It just makes devenv up in flake base projects pure. It does not affect devenv up in devenv.yaml based projects because they have a different implementation of devenv.
Since it changed devenv up, I updated the PR in 56f801a to keep supporting nix develop --no-pure-eval --command devenv up for flake projects that do not include an .envrc, so the direnv is not a dependency any more.
BTW. isn't
devenv-rootat.devenvanddevenv-statewould be.devenv/state?
Yes
@domenkozar Potentially devenv.yaml based projects could also utilize the .devenv/state/pwd file to avoid --no-pure-eval, but it is out of the scope of this PR.
This PR did not affect nix develop --no-pure-eval --command some-test-command behavior in general.
We have some PHP tests that write session files to .devenv/state/php-fpm so they wouldn't have worked anymore.
Thank you for updating it :).