diff options
Diffstat (limited to 'default.nix')
-rw-r--r-- | default.nix | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/default.nix b/default.nix index ae05252..9a8af74 100644 --- a/default.nix +++ b/default.nix @@ -63,6 +63,14 @@ with pkgs.stdenv; rec { touch $out ''; }); + formatNix = baseTask.overrideAttrs (baseAttrs: { + name = "${baseAttrs.name}-nixfmt"; + buildInputs = baseAttrs.buildInputs ++ [nixfmt]; + buildPhase = '' + diff <(nixfmt < default.nix) default.nix + touch $out + ''; + }); docs = baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-docs"; buildInputs = [ websiteBuilder pandoc ]; @@ -86,6 +94,7 @@ with pkgs.stdenv; rec { subtasks.perlPodCheck subtasks.batsTest subtasks.perlInternalTest + subtasks.formatNix ]; buildPhase = '' echo "Ran tests for:" |