From 313a65c91453183e6d5219b2ba7bf0f46990b7f2 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 20 Jan 2019 12:24:59 +0100 Subject: [PATCH] Make import from derivation work again Broken by f503e556ea5cd0a37da87d715b50cd247c63c0e7 Fixes #12 Cause of the problem: nix-instantiate uses the store in read-only mode by default, unlike nix-build. Import from derivation requires a read-write store, causing the command to fail with a (bad) error message. This only happened when the derivation wasn't already built. This did not occur often because commands like arion up use nix-build and therefore typically mask the problem on subsequent invocations. To reproduce the problem, garbage collect, then arion ps. --- src/arion | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arion b/src/arion index 6cac53c..6a3c242 100755 --- a/src/arion +++ b/src/arion @@ -138,9 +138,11 @@ done do_eval() { echo 1>&2 "Evaluating configuration..." + # read-write-mode is required for import from derivation nix-instantiate \ "$nix_dir/eval-docker-compose.nix" \ --eval \ + --read-write-mode \ --json \ --argstr uid "$UID" \ --arg modules "$modules" \