update flake lock, add flake diff, add evaluation json

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2025-03-07 22:26:18 -05:00
parent a755a0c792
commit e2c127a012
8 changed files with 150 additions and 55 deletions

View File

@ -4,11 +4,14 @@ from __future__ import annotations
import logging
import re
from tempfile import mkdtemp
from flupdt.common import bash_wrapper
drv_re = re.compile(r".*(/nix/store/.*\.drv).*")
OUTPUT_DIR = mkdtemp(prefix="flupdt-outputs-")
def build_output(path: str, output: str) -> str | None:
"""Builds a given output in a flake.
@ -18,7 +21,8 @@ def build_output(path: str, output: str) -> str | None:
:returns the .drv path on success or None on failure
"""
logging.info(f"build {output}")
out = bash_wrapper(f"nix build {path}#{output} -o {output}.nixoutput")
logging.debug(f"outputting to {OUTPUT_DIR}/{output}.nixoutput")
out = bash_wrapper(f"nix build {path}#{output} -o {OUTPUT_DIR}/{output}.nixoutput")
logging.debug("output")
logging.debug(out[0])
logging.debug("error")