common-updater-scripts: fix fallback version detection

parseDrvName returns a set containing version attribute, not our customizable key.
This commit is contained in:
Jan Tojnar 2019-05-03 04:17:56 +02:00
parent b85cbd96c2
commit a8293a0848
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -97,7 +97,7 @@ if [ -z "$oldUrl" ]; then
fi
drvName=$(nix-instantiate $systemArg --eval -E "with import ./. {}; (builtins.parseDrvName $attr.name).name" | tr -d '"')
oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (builtins.parseDrvName $attr.name).${versionKey}" | tr -d '"')
oldVersion=$(nix-instantiate $systemArg --eval -E "with import ./. {}; $attr.${versionKey} or (builtins.parseDrvName $attr.name).version" | tr -d '"')
if [ -z "$drvName" -o -z "$oldVersion" ]; then
die "Couldn't evaluate name and version from '$attr.name'!"