From ea9aca2b069376a6fe50da32a487c58e52e66474 Mon Sep 17 00:00:00 2001 From: Georges Dubus Date: Fri, 3 Jul 2020 14:21:31 +0200 Subject: [PATCH] Don't use read-only mode for nix build --dry-run In dry run mode, new derivations can't be create, so running the command on anything that has not been evaluated before results in an error message of the form `don't know how to build these paths (may be caused by read-only store access)`. For comparison, the classical `nix-build --dry-run` doesn't use read-only mode. Closes #1795 --- src/nix/installables.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/nix/installables.cc b/src/nix/installables.cc index 708a0dc888e0..0f846a8be29d 100644 --- a/src/nix/installables.cc +++ b/src/nix/installables.cc @@ -257,9 +257,6 @@ std::shared_ptr parseInstallable( Buildables build(ref store, RealiseMode mode, std::vector> installables) { - if (mode != Build) - settings.readOnlyMode = true; - Buildables buildables; std::vector pathsToBuild;