Skip to content
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

Fix the impure option #1098

Merged
merged 2 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion devenv/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ impl App {
};

if self.cli.impure || self.config.impure {
flags.push("--impure");
// only pass the impure option to the nix command that supports it.
// avoid passing it to the older utilities, e.g. like `nix-store` when creating GC roots.
if command == "nix" {
flags.push("--impure");
}
// set a dummy value to overcome https://github.com/NixOS/nix/issues/10247
cmd.env("NIX_PATH", ":");
}
Expand Down
3 changes: 3 additions & 0 deletions tests/impure/devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
enterTest = ''
echo ${builtins.currentSystem};
'';

# Test procfile evaluation with --impure
processes.hello.exec = "echo hello";
}
Loading