···4343 elif [[ ! -z "${NIX_MAIN_PROGRAM-}" ]]; then
4444 cmdProgram="${!outputBin}/bin/${NIX_MAIN_PROGRAM}"
4545 elif [[ ! -z "${pname-}" ]]; then
4646+ echo "versionCheckHook: Package \`${pname}\` does not have the \`meta.mainProgram\` attribute." \
4747+ "We'll assume that the main program has the same name for now, but this behavior is deprecated," \
4848+ "because it leads to surprising errors when the assumption does not hold." \
4949+ "If the package has a main program, please set \`meta.mainProgram\` in its definition to make this warning go away." \
5050+ "Should the binary that outputs the intended version differ from \`meta.mainProgram\`, consider setting \`versionCheckProgram\` instead." >&2
4651 cmdProgram="${!outputBin}/bin/${pname}"
4752 else
4853 echo "versionCheckHook: \$NIX_MAIN_PROGRAM, \$versionCheckProgram and \$pname are all empty, so" \