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