API: Added endpoint & test for /api/flake/attrs

This commit is contained in:
Qubasa
2023-10-01 12:45:01 +02:00
parent 84bcfc3929
commit ce7ae81a35
7 changed files with 110 additions and 68 deletions

View File

@@ -11,6 +11,18 @@ def nix_command(flags: list[str]) -> list[str]:
return ["nix", "--extra-experimental-features", "nix-command flakes"] + flags
def nix_flake_show(flake_url: str) -> list[str]:
return nix_command(
[
"flake",
"show",
"--json",
"--show-trace",
f"{flake_url}",
]
)
def nix_build(
flags: list[str],
) -> list[str]: