shfmt
pkgs.testers.shfmt
Functor
Docs pulled from | This Revision | 18 days ago
Contribute
Enhance the ecosystem with your expertise! Contribute to fill the gaps in documentation. Your input can make a difference.
Noogle detected
This is a Functor
Learn about functors
Implementation
The following is the current implementation of this function.
{
name,
src,
indent ? 2,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
__structuredAttrs = true;
strictDeps = true;
inherit src indent;
name = "shfmt-${name}";
dontUnpack = true; # Unpack phase tries to extract archive
nativeBuildInputs = [ shfmt ];
doCheck = true;
dontConfigure = true;
dontBuild = true;
checkPhase = ''
shfmt --diff --indent $indent --simplify "$src"
'';
installPhase = ''
touch "$out"
'';
})