writeShellApplication: set meta.mainProgram

This commit is contained in:
Bernardo Meurer 2021-11-08 09:29:14 -08:00
parent ba7b7357ac
commit 174995d14f
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246

View file

@ -292,13 +292,16 @@ rec {
${text} ${text}
''; '';
checkPhase = if checkPhase == null then '' checkPhase =
runHook preCheck if checkPhase == null then ''
${stdenv.shell} -n $out/bin/${name} runHook preCheck
${shellcheck}/bin/shellcheck $out/bin/${name} ${stdenv.shell} -n $out/bin/${name}
runHook postCheck ${shellcheck}/bin/shellcheck $out/bin/${name}
'' runHook postCheck
else checkPhase; ''
else checkPhase;
meta.mainProgram = name;
}; };
# Create a C binary # Create a C binary