From a3457d3f854fd9799769728ff5dfca5cd6de751c Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 29 Dec 2021 10:15:39 +0100 Subject: [PATCH] ci: verify that `meta.maintainers` evaluate Fixes #2588 --- .github/workflows/test.yml | 1 + default.nix | 1 + docs/default.nix | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7b1fdbf7..e04df065 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,7 @@ jobs: echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr exit 1 fi + - run: nix-build -A docs.jsonModuleMaintainers - run: ./format -c - run: nix-shell . -A install - run: nix-shell --arg enableBig false --pure tests -A run.all diff --git a/default.nix b/default.nix index 4438d827..b665b7a6 100644 --- a/default.nix +++ b/default.nix @@ -5,6 +5,7 @@ rec { html = manual.html; manPages = manPages; json = options.json; + jsonModuleMaintainers = jsonModuleMaintainers; # Unstable, mainly for CI. }; home-manager = pkgs.callPackage ./home-manager { path = toString ./.; }; diff --git a/docs/default.nix b/docs/default.nix index fd038d1a..22feac5c 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -117,4 +117,14 @@ in { manPages = docs.manPages; manual = { inherit (docs) html htmlOpenTool; }; + + # Unstable, mainly for CI. + jsonModuleMaintainers = pkgs.writeText "hm-module-maintainers.json" (let + result = lib.evalModules { + modules = import ../modules/modules.nix { + inherit lib pkgs; + check = false; + } ++ [ scrubbedPkgsModule ]; + }; + in builtins.toJSON result.config.meta.maintainers); }