diff options
author | EuAndreh <eu@euandre.org> | 2019-06-01 09:12:44 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-01 09:12:44 -0300 |
commit | f68daad7db1897fc35ac4c17e5373c72b56db6c6 (patch) | |
tree | 9728c60ebe4b6e20bf3e611b5a54fe8e3db29ccb | |
parent | TODOs.org (diff) | |
download | dotfiles-f68daad7db1897fc35ac4c17e5373c72b56db6c6.tar.gz dotfiles-f68daad7db1897fc35ac4c17e5373c72b56db6c6.tar.xz |
Add fallback null value to the shelcheck derivation input
-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 ''; }); |