diff options
Diffstat (limited to 'utils.nix')
-rw-r--r-- | utils.nix | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -14,11 +14,13 @@ in rec { ''; }; shellcheck = ignoredFindPattern: - baseTask.overrideAttrs (baseAttrs: { + baseTask.overrideAttrs (baseAttrs: rec { name = "${baseAttrs.name}-shellcheck"; buildInputs = baseAttrs.buildInputs ++ [ pkgs.shellcheck ]; + ignoredPattern = + if ignoredFindPattern == null then "" else ignoredFindPattern; buildPhase = '' - find . -type f \( -name '*.sh' -and -regextype egrep ! -regex '${ignoredFindPattern}' \) -print0 | xargs -0 shellcheck + find . -type f \( -name '*.sh' -and -regextype egrep ! -regex '${ignoredPattern}' \) -print0 | xargs -0 shellcheck touch $out ''; }); |