diff --git a/pkgs/by-name/ve/versionCheckHook/hook.sh b/pkgs/by-name/ve/versionCheckHook/hook.sh index 26ebf294c37f..4a977fe7a888 100644 --- a/pkgs/by-name/ve/versionCheckHook/hook.sh +++ b/pkgs/by-name/ve/versionCheckHook/hook.sh @@ -43,6 +43,11 @@ versionCheckHook(){ elif [[ ! -z "${NIX_MAIN_PROGRAM-}" ]]; then cmdProgram="${!outputBin}/bin/${NIX_MAIN_PROGRAM}" elif [[ ! -z "${pname-}" ]]; then + echo "versionCheckHook: Package \`${pname}\` does not have the \`meta.mainProgram\` attribute." \ + "We'll assume that the main program has the same name for now, but this behavior is deprecated," \ + "because it leads to surprising errors when the assumption does not hold." \ + "If the package has a main program, please set \`meta.mainProgram\` in its definition to make this warning go away." \ + "Should the binary that outputs the intended version differ from \`meta.mainProgram\`, consider setting \`versionCheckProgram\` instead." >&2 cmdProgram="${!outputBin}/bin/${pname}" else echo "versionCheckHook: \$NIX_MAIN_PROGRAM, \$versionCheckProgram and \$pname are all empty, so" \