Skip to content

Commit a1eb81d

Browse files
committed
add experimental flags
1 parent c279bb4 commit a1eb81d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/devbox/nixprofile.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ import (
1212

1313
func syncFlakeToProfile(ctx context.Context, flakePath, profilePath string) error {
1414
cmd := exec.CommandContext(ctx, "nix", "eval", "--json", flakePath+"#devShells."+nix.System()+".default.buildInputs")
15+
cmd.Args = append(cmd.Args, nix.ExperimentalFlags()...)
1516
b, err := cmd.Output()
1617
if err != nil {
18+
1719
return fmt.Errorf("nix eval devShells: %v", err)
1820
}
1921
storePaths := []string{}
@@ -22,6 +24,7 @@ func syncFlakeToProfile(ctx context.Context, flakePath, profilePath string) erro
2224
}
2325

2426
listCmd := exec.CommandContext(ctx, "nix", "profile", "list", "--json", "--profile", profilePath)
27+
listCmd.Args = append(listCmd.Args, nix.ExperimentalFlags()...)
2528
b, err = listCmd.Output()
2629
if err != nil {
2730
return err
@@ -43,13 +46,15 @@ func syncFlakeToProfile(ctx context.Context, flakePath, profilePath string) erro
4346
if len(remove) > 0 {
4447
removeCmd := exec.CommandContext(ctx, "nix", "profile", "remove", "--profile", profilePath)
4548
removeCmd.Args = append(removeCmd.Args, remove...)
49+
removeCmd.Args = append(removeCmd.Args, nix.ExperimentalFlags()...)
4650
if err := removeCmd.Run(); err != nil {
4751
return err
4852
}
4953
}
5054
if len(add) > 0 {
5155
addCmd := exec.CommandContext(ctx, "nix", "profile", "install", "--profile", profilePath)
5256
addCmd.Args = append(addCmd.Args, add...)
57+
addCmd.Args = append(addCmd.Args, nix.ExperimentalFlags()...)
5358
if err := addCmd.Run(); err != nil {
5459
return err
5560
}

0 commit comments

Comments
 (0)