gnome3.updateScript: fix tarball eval on nonexisting attrpaths

As reported in 974f11cb29 (commitcomment-38735081),
the tarball will fail to evaluate when updateScript is given a non-existing attrPath because getAttrFromPath
uses abort, which terminates the evaluation.
This commit is contained in:
Jan Tojnar 2020-04-25 15:23:35 +02:00
parent 22133c6bf3
commit f544c293ec
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -5,7 +5,7 @@ let
python = python3.withPackages (p: [ p.requests ]);
upperBoundFlag =
let
package = lib.getAttrFromPath (lib.splitString "." attrPath) pkgs;
package = lib.attrByPath (lib.splitString "." attrPath) (throw "Cannot find attribute ${attrPath}.") pkgs;
packageVersion = lib.getVersion package;
versionComponents = lib.versions.splitVersion packageVersion;
minorVersion = lib.versions.minor packageVersion;