Skip to content

Commit

Permalink
Merge pull request #1098 from cachix/fix-1063
Browse files Browse the repository at this point in the history
Fix the `impure` option
  • Loading branch information
domenkozar authored Apr 3, 2024
2 parents a18e86a + bdcb457 commit 6b274c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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";
}

0 comments on commit 6b274c6

Please sign in to comment.