-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI evaluation check does allow impure evaluation #997
Comments
I agree we should do the evaluation check differently, not using The reason the eval check is now done the way it is (using the eval.sh) is an attempt to improve the evaluation check runtime in github action, as discussed in PR#988. I think such impure evaluation might be acceptable in this specific case, since we only check if ghaf flake still evaluates after the changes, but otherwise don't store or reuse the evaluation results anywhere. As an example, github action triggered builds still run 'pure' in a separate workflow. |
@Mic92 wrote:
I did trial the above suggested workaround here: henrirosten@9440fdc but it gives the following error:
|
When using
nix-eval-jobs
with--expr
the evaluation is impure i.e. allows to read arbitrary files and environment variablesghaf/.github/eval.sh
Line 167 in 88e0844
However there is a work around it that we use in the terraform module of nixos-anywhere: https://github.com/nix-community/nixos-anywhere/blob/d4a3ecf32bd3cc9d243e0a2f37de91bc84b14216/terraform/nix-build/nix-build.sh#L38
When builtins.getFlake also receives a narHash than it can be used in pure evaluation.
This means we can set
--option pure-eval true
in nix-eval-jobs to force pure evaluation.The text was updated successfully, but these errors were encountered: