Upgrade 20.03 to 20.09 failes due to broken libguestfs-1.40.2

My attempt to upgrade 20.03.2648.69af91469be (Markhor) to 20.9 failed due to libguestfs-1.40.2

# nix-channel --list 
nixos https://nixos.org/channels/nixos-20.09
# nixos-rebuild test --upgrade 
unpacking channels...
building Nix...
building the system configuration...
error: Package ‘libguestfs-1.40.2’ in /nix/store/rcq8cqxfypnr06fimibw19dvdypjhig5-nixos-20.09.1500.edb26126d98/nixos/pkgs/development/libraries/libguestfs/default.nix:88 is marked as broken, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

(use '--show-trace' to show detailed location information)

Does anyone faced the issue?
Does anyone know how to fix it?

1 Like

It was marked broken in https://github.com/NixOS/nixpkgs/pull/101736

a “flavor” of libguestfs was failing: https://hydra.nixos.org/eval/1622004?filter=libguest&compare=1621911&full=#tabs-still-fail and this got marked broken by accident.

PR to remedy: https://github.com/NixOS/nixpkgs/pull/102077

Apologize, we don’t have really any great tooling around marking the failing builds as broken. And manually doing a few hundred is very error prone.


Thank you very much for your help, @jonringer!

1 Like

I had the same problem, and as a fairly new NixOS user had no idea how to fix it. Thanks to @palik for posting the question, and to @jonringer for fixing it so quickly!


interesting though, as the other package already had hydraPlatforms = [];, so it shouldn’t have been building it.

If you want to try a rebuild with the changes include, you can do:

sudo nixos-rebuild -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/6741f33b11e77dd8e19563300ac06940cd9e8d45.tar.gz dry-run

That run error-free.

1 Like

It’s now merged into the release branch, should be available in around 24 hrs

or, if you’re impatient:

sudo nixos-rebuild -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/release-20.09.tar.gz switch