gnome.updateScript: Support freezing up to an explicit version
libgweather released version 4 after releasing version 40, we need to ignore the latter.
This commit is contained in:
parent
e628b43a9c
commit
a5af361af4
1 changed files with 7 additions and 1 deletions
|
@ -12,7 +12,13 @@ let
|
||||||
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
|
minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null;
|
||||||
nextMinor = builtins.fromJSON minorVersion + 1;
|
nextMinor = builtins.fromJSON minorVersion + 1;
|
||||||
upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}";
|
upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}";
|
||||||
in lib.optionals (freeze && minorAvailable) [ upperBound ];
|
in
|
||||||
|
if builtins.isBool freeze then
|
||||||
|
lib.optionals (freeze && minorAvailable) [ upperBound ]
|
||||||
|
else if builtins.isString freeze then
|
||||||
|
[ freeze ]
|
||||||
|
else
|
||||||
|
throw "“freeze” argument needs to be either a boolean, or a version string.";
|
||||||
updateScript = writeScript "gnome-update-script" ''
|
updateScript = writeScript "gnome-update-script" ''
|
||||||
#!${bash}/bin/bash
|
#!${bash}/bin/bash
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
Loading…
Reference in a new issue