Skip to content

Commit

Permalink
Allow Nix unfree packages to be upgraded (#881)
Browse files Browse the repository at this point in the history
Allow unfree packages to be upgraded

Fixes #611.

Co-authored-by: Daniel Horecki <morr@morr.pl>
  • Loading branch information
dashmoho and Daniel Horecki authored Aug 1, 2024
1 parent 8ece034 commit 55f672e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/steps/os/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {

debug!("Nix version: {:?}", version);

let mut packages = "--all";
let mut packages: Vec<&str> = vec!["--all", "--impure"];

if !matches!(version, Ok(version) if version >= Version::new(2, 21, 0)) {
packages = ".*";
packages = vec![".*"];
}

if Path::new(&manifest_json_path).exists() {
Expand All @@ -425,7 +425,7 @@ pub fn run_nix(ctx: &ExecutionContext) -> Result<()> {
.args(nix_args())
.arg("profile")
.arg("upgrade")
.arg(packages)
.args(&packages)
.arg("--verbose")
.status_checked()
} else {
Expand Down

0 comments on commit 55f672e

Please sign in to comment.