nixtest/lib/flakeModule.nix

30 lines
582 B
Nix
Raw Normal View History

2025-05-03 22:05:29 +02:00
{
flake-parts-lib,
lib,
self,
2025-05-03 22:05:29 +02:00
...
}: let
inherit (lib) mkOption types;
in {
options.perSystem = flake-parts-lib.mkPerSystemOption (
{
config,
pkgs,
...
}: let
nixtests-lib = import ./. {inherit pkgs self;};
2025-05-03 22:05:29 +02:00
in {
options.nixtest = mkOption {
type = types.submodule (nixtests-lib.module);
2025-05-03 22:05:29 +02:00
default = {};
};
config.nixtest.base = toString self + "/";
2025-05-03 22:05:29 +02:00
config.legacyPackages = {
"nixtests" = config.nixtest.finalConfigJson;
"nixtests:run" = config.nixtest.app;
2025-05-03 22:05:29 +02:00
};
}
);
}