From 3f128cc0247a95cfdcbb34a96c230422706b1715 Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Tue, 12 Apr 2022 21:13:26 +0100 Subject: [PATCH] lib/tests: evaluate value from subflake with callLocklessFlake --- lib/tests/flakes/subflakeTest/flake.nix | 10 +++++----- lib/tests/flakes/subflakeTest/subflake/flake.nix | 2 +- lib/tests/misc.nix | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tests/flakes/subflakeTest/flake.nix b/lib/tests/flakes/subflakeTest/flake.nix index 3dca262cace6..3a8edd5e8c50 100644 --- a/lib/tests/flakes/subflakeTest/flake.nix +++ b/lib/tests/flakes/subflakeTest/flake.nix @@ -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; }; } diff --git a/lib/tests/flakes/subflakeTest/subflake/flake.nix b/lib/tests/flakes/subflakeTest/subflake/flake.nix index 9ae32d72ef6f..41566b52090c 100644 --- a/lib/tests/flakes/subflakeTest/subflake/flake.nix +++ b/lib/tests/flakes/subflakeTest/subflake/flake.nix @@ -1,5 +1,5 @@ { outputs = { self }: { - y = 1; + subflakeOutput = 1; }; } diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index e11fe648cc92..dcb56d0c1fc6 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -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