Merge pull request #305 from ThVerg/fix-nix-develop-flake-path

Fix nix develop invocation for verification scripts
This commit is contained in:
Jesse Cirimelli-Low 2026-08-12 18:32:25 -07:00 committed by GitHub
commit 744cb98c2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -33,10 +33,15 @@ def run_script(cell_name, script="lvs"):
start = time.time()
with open(outfile, 'wb') as fo, open(errfile, 'wb') as fe:
if OPTS.use_nix:
# The script runs in openram_temp, which has no flake.nix, so the
# flake has to be named explicitly or nix searches up from the temp
# directory, fails, and the script never runs at all.
repo_root = os.path.abspath(os.path.join(os.environ["OPENRAM_HOME"], ".."))
p_cmd = [
"nix",
"--extra-experimental-features", "nix-command flakes",
"develop",
"path:{}".format(repo_root),
"--command",
scriptpath,
]