mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
microsoft-edge: Change update script to have consistent ordering of versions
The current behaviour means it follows the order they are published in microsofts repos which sometimes changes on updates. This changes it to sort by the branch name string which should be more consistent. This patch doesn't change the ordering in default.nix will leave that for the next update patch to make that patch more easily backportable.
This commit is contained in:
parent
939e432e46
commit
95a2ac0fd9
|
@ -180,7 +180,9 @@ stdenv.mkDerivation rec {
|
|||
--add-flags ${lib.escapeShellArg commandLineArgs}
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.py;
|
||||
# We only want automatic updates for stable, beta and dev will get updated by the same script
|
||||
# and are only used for testing.
|
||||
passthru = lib.optionalAttrs (channel == "stable") { updateScript = ./update.py; };
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.microsoft.com/en-us/edge";
|
||||
|
|
|
@ -31,7 +31,7 @@ def latest_packages(packages: bytes):
|
|||
old_package = latest_packages[channel]
|
||||
if old_package.get_version() < package.get_version(): # type: ignore
|
||||
latest_packages[channel] = package
|
||||
return latest_packages
|
||||
return OrderedDict(sorted(latest_packages.items(), key=lambda x:x[0]))
|
||||
|
||||
|
||||
def nix_expressions(latest: dict[str, Packages]):
|
||||
|
|
Loading…
Reference in a new issue