Skip to content

Commit

Permalink
ioc/checks: add epnixConfig, encourage its usage
Browse files Browse the repository at this point in the history
  • Loading branch information
minijackson committed May 23, 2023
1 parent c761658 commit d95c17b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ioc/modules/checks.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
config,
epnix,
epnixConfig,
lib,
pkgs,
...
Expand Down Expand Up @@ -41,8 +43,17 @@ in {

importCheck = path:
import path {
inherit pkgs;
inherit (config.epnix.outputs) build;
inherit pkgs epnix epnixConfig;

build =
lib.warn
''
using 'build' in a check is deprecated.
Please see the current EPNix IOC template for the new way of implementing checks:
- ${epnix}/templates/top/checks/simple.nix
''
config.epnix.outputs.build;
};
in
listToAttrs
Expand Down
3 changes: 3 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ with lib; let
in {
# See: https://github.com/NixOS/nixpkgs/pull/190358
pkgs = finalPkgs.__splicedPackages;

# Used when we want to apply the same config in checks
inherit epnixConfig;
};
})

Expand Down

0 comments on commit d95c17b

Please sign in to comment.