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 <henri.rosten@unikie.com>
  • Loading branch information
henrirosten committed Mar 27, 2024
1 parent b60bf4d commit d88fb82
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 d88fb82

Please sign in to comment.