mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
lib/tests: evaluate value from subflake with callLocklessFlake
This commit is contained in:
parent
ec59145c3b
commit
3f128cc024
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
outputs = { self }: {
|
||||
y = 1;
|
||||
subflakeOutput = 1;
|
||||
};
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user