Templates: fix invalid mock flake

This commit is contained in:
Johannes Kirschbauer
2025-07-06 16:43:38 +02:00
parent ad169d4d52
commit 072654abd6
2 changed files with 14 additions and 5 deletions

View File

@@ -832,7 +832,8 @@ nix repl --expr 'rec {{
""") """)
# fmt: on # fmt: on
elif len(selectors) == 1: elif len(selectors) == 1:
log.debug(f""" log.debug(
f"""
selecting: {selectors[0]} selecting: {selectors[0]}
to debug run: to debug run:
nix repl --expr 'rec {{ nix repl --expr 'rec {{
@@ -840,11 +841,13 @@ nix repl --expr 'rec {{
selectLib = (builtins.getFlake "path:{select_source()}?narHash={select_hash}").lib; selectLib = (builtins.getFlake "path:{select_source()}?narHash={select_hash}").lib;
query = selectLib.select '"''{selectors[0]}''"' flake; query = selectLib.select '"''{selectors[0]}''"' flake;
}}' }}'
""") """
)
build_output = Path( build_output = Path(
run( run(
nix_build(["--expr", nix_code, *nix_options]), RunOpts(log=Log.NONE, trace=False), nix_build(["--expr", nix_code, *nix_options]),
RunOpts(log=Log.NONE, trace=False),
).stdout.strip() ).stdout.strip()
) )

View File

@@ -1,8 +1,8 @@
{ {
outputs = outputs =
{ ... }: { ... }:
{ let
clan.templates = { templates = {
disko = { disko = {
single-disk = { single-disk = {
description = "A simple ext4 disk with a single partition"; description = "A simple ext4 disk with a single partition";
@@ -41,5 +41,11 @@
}; };
}; };
}; };
in
rec {
inherit (clan) clanInternals;
clan.clanInternals.templates = templates;
clan.templates = templates;
}; };
} }