Skip to content

Commit

Permalink
Add extra-exp-features to provenance nix commands
Browse files Browse the repository at this point in the history
Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Mar 25, 2024
1 parent 2b5e395 commit c6ddeca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/provenance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ def provenance(target: str, metadata: BuildMeta, recursive: bool = False) -> dic

LOG.info("Generating provenance file for '%s'", target)

drv_json = json.loads(exec_cmd(["nix", "derivation", "show", target]).stdout)
exp = "--extra-experimental-features flakes "
exp += "--extra-experimental-features nix-command"
cmd = f"nix derivation show {target} {exp}"
drv_json = json.loads(exec_cmd(cmd.split()).stdout)
drv_path = next(iter(drv_json))
drv_json = drv_json[drv_path]

Expand Down

0 comments on commit c6ddeca

Please sign in to comment.