From 9a758fb86ee3c3611197a3236ae667ba6db702c4 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Tue, 7 Nov 2023 20:26:34 -0800 Subject: [PATCH] remove need for intermediary file --- flake.nix | 14 +++++++++++--- test/default.nix | 2 -- 2 files changed, 11 insertions(+), 5 deletions(-) delete mode 100644 test/default.nix diff --git a/flake.nix b/flake.nix index 42fb077..2e4bcb4 100644 --- a/flake.nix +++ b/flake.nix @@ -38,9 +38,17 @@ checks = { tests = nix-flake-tests.lib.check { inherit pkgs; - tests = import ./test/default.nix { - inherit (pkgs) lib; - }; + tests = + let + importFiles = files: + map (m: import m { + inherit (pkgs) lib; + }) files; + + mergeTests = pkgs.lib.lists.foldl pkgs.lib.trivial.mergeAttrs {}; + in mergeTests (importFiles [ + ./test/modules/postgresql.nix + ]); }; }; # templates.default = {}; Would be nice to have a template diff --git a/test/default.nix b/test/default.nix deleted file mode 100644 index 9110865..0000000 --- a/test/default.nix +++ /dev/null @@ -1,2 +0,0 @@ -{ lib }: -import ./modules/postgresql.nix { inherit lib; }