Merge pull request #274126 from adamcstephens/ovn/init

openvswitch: 3.1.1 -> 3.2.1, openvswitch-lts: 2.17.6 -> 2.17.8
This commit is contained in:
Adam C. Stephens
2023-12-15 09:11:29 -05:00
committed by GitHub
4 changed files with 30 additions and 4 deletions
@@ -1,4 +1,4 @@
import ./generic.nix {
version = "3.1.1";
hash = "sha256-YEiRg6RNO5WlUiQHIhfF9tN6oRvhKnV2JRDO25Ok4gQ=";
version = "3.2.1";
hash = "sha256-nXdyDJIU60Lx9cvpLuUp3E7MUnaZvvGDm+UKbXJRH0o=";
}
@@ -1,5 +1,6 @@
{ version
, hash
, updateScriptArgs ? ""
}:
{ lib
@@ -20,6 +21,7 @@
, sphinxHook
, util-linux
, which
, writeScript
}:
let
@@ -105,6 +107,10 @@ in stdenv.mkDerivation rec {
pytest
]);
passthru.updateScript = writeScript "ovs-update.nu" ''
${./update.nu} ${updateScriptArgs}
'';
meta = with lib; {
changelog = "https://www.openvswitch.org/releases/NEWS-${version}.txt";
description = "A multilayer virtual switch";
+3 -2
View File
@@ -1,4 +1,5 @@
import ./generic.nix {
version = "2.17.6";
hash = "sha256-dNqvK+c0iuXdQBe6RbjaxlNB8Vn0+0paecVC/tQQENk=";
version = "2.17.8";
hash = "sha256-DWAwepAxl90ay7MXPCz++BicaeSHYuZ06O8VeFZac+U=";
updateScriptArgs = "--lts=true --regex '2\.17.*'";
}
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell common-updater-scripts
def main [--lts: bool = false, --regex: string] {
let tags = list-git-tags --url=https://github.com/openvswitch/ovs | lines | sort --natural | str replace v ''
let latest_tag = if $regex == null { $tags } else { $tags | find --regex $regex } | last
let current_version = nix eval --raw -f default.nix $"openvswitch(if $lts {"-lts"}).version" | str trim
if $latest_tag != $current_version {
if $lts {
update-source-version openvswitch-lts $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/lts.nix"
} else {
update-source-version openvswitch $latest_tag $"--file=(pwd)/pkgs/os-specific/linux/openvswitch/default.nix"
}
}
{"lts?": $lts, before: $current_version, after: $latest_tag}
}