fix(build): keep scripts/build/inputs.py free of pm imports; accept musl targets in its grammar
The Nix agent derivation builds scripts/build/*.py from a fileset that does not include pm/, so importing pm.store.ALL_TARGETS there failed nix flake check with ModuleNotFoundError. Extend the local target regex with linux-(x64|arm64)-musl instead.
This commit is contained in:
@@ -7,8 +7,6 @@ import json
|
||||
import re
|
||||
import tomllib
|
||||
|
||||
from pm.store import ALL_TARGETS
|
||||
|
||||
|
||||
RESOURCE_ENV = {
|
||||
"skills": "HERMES_BUNDLED_SKILLS",
|
||||
@@ -72,7 +70,7 @@ class AgentInputs:
|
||||
return cls(**values)
|
||||
|
||||
def validate(self, out: Path) -> None:
|
||||
if self.target not in ALL_TARGETS:
|
||||
if not re.fullmatch(r"(?:(?:linux|darwin|win32)-(?:x64|arm64)|linux-(?:x64|arm64)-musl|linux-arm64-bionic)", self.target):
|
||||
raise ValueError(f"unsupported target: {self.target}")
|
||||
if self.placement not in ("contained", "fixed", "references"):
|
||||
raise ValueError(f"unknown placement: {self.placement}")
|
||||
|
||||
Reference in New Issue
Block a user