ProfileRemove removes packages from a profile. WARNING, don't use indexes, they are not supported by nix 2.20+
(profilePath string, packageNames ...string)
| 70 | // ProfileRemove removes packages from a profile. |
| 71 | // WARNING, don't use indexes, they are not supported by nix 2.20+ |
| 72 | func 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 | |
| 86 | type manifest struct { |
| 87 | Elements []struct { |
no test coverage detected