Skip to content

Commit

Permalink
fix: account for --extra-nixpkgs-config when computing differences()
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneSerge committed Feb 28, 2023
1 parent 6ffaffa commit 9c3c9fe
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions nixpkgs_review/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,18 @@ def build_commit(
Review a local git commit
"""
self.git_worktree(base_commit)

entry_point = Path(self.worktree_dir(), "with-extra-config.nix")

with entry_point.open(mode="w") as f:
nixpkgs_config = self.extra_nixpkgs_config or "{ }"
print("{ system ? builtins.currentSystem, ... }@args:", file=f)
print(
f"import ./. {{ inherit system; }} // args // {nixpkgs_config}", file=f
)

base_packages = list_packages(
str(self.worktree_dir()),
entry_point.as_posix(),
self.system,
self.allow,
)
Expand All @@ -159,7 +169,7 @@ def build_commit(
self.git_merge(reviewed_commit)

merged_packages = list_packages(
str(self.worktree_dir()),
entry_point.as_posix(),
self.system,
self.allow,
check_meta=True,
Expand Down

0 comments on commit 9c3c9fe

Please sign in to comment.