diff options
Diffstat (limited to 'nixos/utils.nix')
-rw-r--r-- | nixos/utils.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/utils.nix b/nixos/utils.nix index f809dd9..30110a4 100644 --- a/nixos/utils.nix +++ b/nixos/utils.nix @@ -14,13 +14,12 @@ in rec { exit 1 ''; }; - shellcheck = baseTask.overrideAttrs (baseAttrs: { + shellcheck = ignoredFindPattern: + baseTask.overrideAttrs (baseAttrs: { name = "${baseAttrs.name}-shellcheck"; buildInputs = baseAttrs.buildInputs ++ [ pkgs.shellcheck ]; buildPhase = '' - export SHELLCHECK_OPTS="-e SC1090 -e SC1091 -e SC2139" - ignored='(encrypted|os-installation.sh|notmuch-post.sh)' - find . -type f -name '*.sh' | grep -E -v $ignored | xargs shellcheck + find . -type f \( -name '*.sh' -and -regextype egrep ! -regex '${ignoredFindPattern}' \) -print0 | xargs -0 shellcheck touch $out ''; }); |