lib/tests: evaluate value from subflake with callLocklessFlake

This commit is contained in:
matthewcroughan 2022-04-12 21:13:26 +01:00
parent ec59145c3b
commit 3f128cc024
3 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
{
inputs = {
subflake.url = "path:subflake";
};
outputs = { self, subflake }: {
x = subflake;
outputs = { self, subflake, callLocklessFlake }: rec {
x = (callLocklessFlake {
path = subflake;
inputs = {};
}).subflakeOutput;
};
}

View File

@ -1,5 +1,5 @@
{
outputs = { self }: {
y = 1;
subflakeOutput = 1;
};
}

View File

@ -27,9 +27,9 @@ runTests {
testCallLocklessFlake = {
expr = callLocklessFlake {
path = ./flakes/subflakeTest;
inputs = { subflake = ./flakes/subflakeTest/subflake; };
inputs = { subflake = ./flakes/subflakeTest/subflake; inherit callLocklessFlake; };
};
expected = { x = ./flakes/subflakeTest/subflake; outPath = ./flakes/subflakeTest; };
expected = { x = 1; outPath = ./flakes/subflakeTest; };
};
# TRIVIAL