MCPcopy
hub / github.com/jetify-com/devbox / ProfileRemove

Function ProfileRemove

internal/nix/profiles.go:72–84  ·  view source on GitHub ↗

ProfileRemove removes packages from a profile. WARNING, don't use indexes, they are not supported by nix 2.20+

(profilePath string, packageNames ...string)

Source from the content-addressed store, hash-verified

70// ProfileRemove removes packages from a profile.
71// WARNING, don't use indexes, they are not supported by nix 2.20+
72func ProfileRemove(profilePath string, packageNames ...string) error {
73 defer debug.FunctionTimer().End()
74 cmd := Command(
75 "profile", "remove",
76 "--profile", profilePath,
77 "--impure", // for NIXPKGS_ALLOW_UNFREE
78 )
79
80 FixInstallableArgs(packageNames)
81 cmd.Args = appendArgs(cmd.Args, packageNames)
82 cmd.Env = allowUnfreeEnv(allowInsecureEnv(os.Environ()))
83 return cmd.Run(context.TODO())
84}
85
86type manifest struct {
87 Elements []struct {

Callers 1

Calls 8

FunctionTimerFunction · 0.92
FixInstallableArgsFunction · 0.85
appendArgsFunction · 0.85
allowUnfreeEnvFunction · 0.85
allowInsecureEnvFunction · 0.85
EndMethod · 0.80
CommandFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected