From a828cf777aa3497879aeca407af97b652d1edee7 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Nov 2025 15:19:01 +0100 Subject: [PATCH] nix flake check: Remove incorrect assertion The assumption that no unknown paths can be returned is incorrect. It can happen if a derivation has outputs that are substitutable, but that have references that cannot be substituted (i.e. an incomplete closure in the binary cache). This can easily happen with magic-nix-cache. --- src/nix/flake.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nix/flake.cc b/src/nix/flake.cc index b826e943c..55112f30f 100644 --- a/src/nix/flake.cc +++ b/src/nix/flake.cc @@ -793,8 +793,6 @@ struct CmdFlakeCheck : FlakeCommand // via substitution, as `nix flake check` only needs to verify buildability, // not actually produce the outputs. auto missing = store->queryMissing(drvPaths); - // Only occurs if `drvPaths` contains a `DerivedPath::Opaque`, which should never happen - assert(missing.unknown.empty()); std::vector toBuild; for (auto & path : missing.willBuild) {