Skip to content

eval: use a work directory instead of an environment variable to control the Nix expression#84

Merged
infinisil merged 1 commit intoNixOS:mainfrom
philiptaron:remove-NIX_CHECK_BY_NAME_EXPR_PATH
Jul 21, 2024
Merged

eval: use a work directory instead of an environment variable to control the Nix expression#84
infinisil merged 1 commit intoNixOS:mainfrom
philiptaron:remove-NIX_CHECK_BY_NAME_EXPR_PATH

Conversation

@philiptaron
Copy link
Contributor

Motivation

This reduces the list of environment variables needed in order to use the unwrapped nixpkgs-check-name tool to one: NIX_CHECK_BY_NAME_NIX_PACKAGE. #79 now needs to use the unwrapped tool in order to control which Nix is used in an integration test, but it shouldn't have to figure this detail out.

No test used the NIX_CHECK_BY_NAME_EXPR_PATH to change the Nix file that was read, and it's simpler and shorter to rebuild in order to test out changes to the src/eval.nix.

Things Done

  • Removed the Nix plumbing around runtimeExprPath
  • Removed the NIX_CHECK_BY_NAME_EXPR_PATH environment variable
  • Embedded eval.nix in the binary
  • Used a work directory instead of a temporary file

…rol the Nix expression

No test used the `NIX_CHECK_BY_NAME_EXPR_PATH` to change the Nix file that was read, and it's simple
to rebuild in order to test out changes to the `src/eval.nix`.
@philiptaron philiptaron requested a review from a team as a code owner July 20, 2024 17:48
Copy link
Member

@willbush willbush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'd wait for @infinisil review. He has a much better understanding of this than I do.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM!

@infinisil infinisil merged commit 8d26785 into NixOS:main Jul 21, 2024
@philiptaron philiptaron deleted the remove-NIX_CHECK_BY_NAME_EXPR_PATH branch August 29, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants