Make import from derivation work again
Broken by f503e556ea
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.
This commit is contained in:
parent
da7091c37b
commit
313a65c914
1 changed files with 2 additions and 0 deletions
|
@ -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" \
|
||||
|
|
Loading…
Reference in a new issue