switch from conda to nix for tooling

This commit is contained in:
Jesse Cirimelli-Low
2026-05-11 10:44:24 -07:00
parent f2db9fe2de
commit cbd2bd7c2e
17 changed files with 178 additions and 174 deletions
+11 -16
View File
@@ -29,26 +29,21 @@ def run_script(cell_name, script="lvs"):
scriptpath = '{0}run_{1}.sh'.format(OPTS.openram_temp, script)
# Wrap with conda activate & conda deactivate
if OPTS.use_conda:
from openram import CONDA_HOME
with open(scriptpath, "r") as f:
script_content = f.readlines()
with open(scriptpath, "w") as f:
# First line is shebang
f.write(script_content[0])
# Activate conda using the activate script
f.write("source {}/bin/activate\n".format(CONDA_HOME))
for line in script_content[1:]:
f.write(line)
# Deactivate conda at the end
f.write("conda deactivate\n")
debug.info(2, "Starting {}".format(scriptpath))
start = time.time()
with open(outfile, 'wb') as fo, open(errfile, 'wb') as fe:
if OPTS.use_nix:
p_cmd = [
"nix",
"--extra-experimental-features", "nix-command flakes",
"develop",
"--command",
scriptpath,
]
else:
p_cmd = [scriptpath]
p = subprocess.Popen(
[scriptpath], stdout=fo, stderr=fe, cwd=OPTS.openram_temp)
p_cmd, stdout=fo, stderr=fe, cwd=OPTS.openram_temp)
if echo_cmd_output:
tailo = subprocess.Popen([