Skip to content
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

don't rely on NIX_PATH #349

Merged
merged 5 commits into from
Aug 13, 2023
Merged

don't rely on NIX_PATH #349

merged 5 commits into from
Aug 13, 2023

Conversation

figsoda
Copy link
Collaborator

@figsoda figsoda commented Aug 11, 2023

Nix does not respect NIX_PATH when the nix-path setting in nix.conf
is set, which breaks the nix-store --verify-path due to <nixpkgs>
diverging from the temporary nixpkgs created by nixpkgs-review.

fixes #343

@@ -63,7 +63,7 @@ def __init__(self, name: str) -> None:
os.environ["NIX_PATH"] = self.nixpkgs_path()

def nixpkgs_path(self) -> str:
return f"nixpkgs={self.worktree_dir}:nixpkgs-overlays={self.overlay.path}"
return f"nixpkgs={self.worktree_dir} nixpkgs-overlays={self.overlay.path}"
Copy link
Owner

Choose a reason for hiding this comment

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

Is space an allowed separator in the environment variable as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

reading the source code, I don't think it is

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I rewrote the patch to make nixpkgs-review not rely on NIX_PATH, hopefully I didn't accidently break something

Copy link
Owner

Choose a reason for hiding this comment

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

I actually find it quite handy to have a NIX_PATH set. Can we not just keep it, but not rely on it for our own tooling?

@figsoda figsoda marked this pull request as draft August 12, 2023 13:51
@figsoda figsoda changed the title fix #343 don't rely on NIX_PATH Aug 12, 2023
Nix does not respect `NIX_PATH` when the `nix-path` setting in nix.conf
is set, which breaks the `nix-store --verify-path` due to `<nixpkgs>`
diverging from the temporary nixpkgs created by nixpkgs-review.
@figsoda figsoda marked this pull request as ready for review August 12, 2023 15:27
figsoda and others added 3 commits August 12, 2023 13:22
@Mic92
Copy link
Owner

Mic92 commented Aug 13, 2023

@mergify queue

@mergify
Copy link
Contributor

mergify bot commented Aug 13, 2023

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at e92c011

@mergify mergify bot merged commit e92c011 into Mic92:master Aug 13, 2023
4 checks passed
@figsoda figsoda deleted the nixpkgs branch August 13, 2023 12:49
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.

os.environ["NIX_PATH"] = self.nixpkgs_path() silently get ignored when nix-path is set in nix.conf
2 participants