mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
disko cli: fix error about impurity with nix
The script is generated by calling `nix-build` on the `cli.nix` file. This fails on systems, which have the nix option pure_eval set, as nix refuses to evaluate an untracked file. This would normally be impure, but in this case the file is supplied in the same nix store path, i.e. it's not referencing foreign files. Thus adding the `--impure` argument should leave the nix call in fact still pure.
This commit is contained in:
1 file changed
+2
@@ -116,8 +116,10 @@ else
|
||||
abort "disko config must be an existing file or flake must be set"
|
||||
fi
|
||||
|
||||
# The "--impure" is still pure, as the path is withing the nix store.
|
||||
script=$(nix-build "${libexec_dir}"/cli.nix \
|
||||
--no-out-link \
|
||||
--impure \
|
||||
--argstr mode "$mode" \
|
||||
"${nix_args[@]}"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user