From 90f24aef89cab53ccc72ea821e64c49fde060e99 Mon Sep 17 00:00:00 2001 From: Soispha Date: Wed, 28 Jun 2023 17:35:27 +0200 Subject: [PATCH] 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. --- disko | 2 ++ 1 file changed, 2 insertions(+) diff --git a/disko b/disko index 9da4bfd..a25f6ac 100755 --- a/disko +++ b/disko @@ -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[@]}" )