From d11737846ed46d4b9ba6246d81b1031d802d7b6e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 6 Feb 2020 12:21:23 -0300 Subject: Run assert-content.sh in test derivation --- default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'default.nix') diff --git a/default.nix b/default.nix index 5f6663d..c664429 100644 --- a/default.nix +++ b/default.nix @@ -22,6 +22,15 @@ in rec { touch $out ''; }); + assertContent = utils.baseTask.overrideAttrs (baseAttrs: { + name = "${baseAttrs.name}-assert-content"; + buildInputs = baseAttrs.buildInputs ++ [ pkgs.jq ]; + buildPhase = '' + patchShebangs . + ./scripts/assert-content.sh "${subtasks.docs}/site.json" + touch $out + ''; + }); docs = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-docs"; buildInputs = [ jekyllEnv ]; @@ -35,6 +44,7 @@ in rec { (utils.shellcheck null) (utils.fixme null) subtasks.hunspellCheck + subtasks.assertContent ]; shell = pkgs.mkShell rec { name = "website-shell"; -- cgit v1.2.3