From ec35adebed8fe053f3e2f1af3661739f66b535cc Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 6 Feb 2020 03:37:19 -0300 Subject: Run hunspell in test derivation --- default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/default.nix b/default.nix index e79da46..31b82f2 100644 --- a/default.nix +++ b/default.nix @@ -13,6 +13,16 @@ in rec { gemset = ./gemset.nix; }; subtasks = rec { + hunspellCheck = utils.baseTask.overrideAttrs (baseAttrs: { + name = "${baseAttrs.name}-hunspell"; + buildInputs = baseAttrs.buildInputs + ++ [ (pkgs.hunspellWithDicts (with pkgs.hunspellDicts; [ en-us ])) ]; + buildPhase = '' + patchShebangs . + ./spelling/check-spelling.sh "${subtasks.docs}" + touch $out + ''; + }); docs = utils.baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-docs"; buildInputs = [ jekyllEnv ]; @@ -26,6 +36,7 @@ in rec { utils.formatNix (utils.shellcheck null) (utils.fixme null) + subtasks.hunspellCheck ]; shell = pkgs.mkShell rec { name = "website-shell"; -- cgit v1.2.3