diff --git a/instantiated.go b/instantiated.go index 72443de..52729c9 100644 --- a/instantiated.go +++ b/instantiated.go @@ -11,6 +11,10 @@ import ( "strings" ) +var ( + Stdout io.Writer = nil +) + const ( instantiatedPrefix = "instantiated '" instantiatedSeparator = " -> " @@ -104,6 +108,8 @@ func EvalInstantiated(ctx context.Context, installable string) ([]string, error) cmd := exec.CommandContext(c, "nix", "build", installable, + // since flakes are supposedly experimental + "--extra-experimental-features", "nix-command flakes", // 'instantiated' messages are only emitted when actually evaluating something "--option", "eval-cache", "false", // do not actually build anything @@ -112,6 +118,7 @@ func EvalInstantiated(ctx context.Context, installable string) ([]string, error) "-Lvvv", ) + cmd.Stdout = Stdout stderr, err := cmd.StderrPipe() if err != nil { return nil, err