gns3-gui,gns3-server: use passthru.updateScript

gns3-gui and gns3-server versions should kept in sync.
This commit is contained in:
Anthony ROUSSEL
2026-02-04 21:48:21 +01:00
parent a9da5e8b0d
commit 3ecd2d02fa
2 changed files with 24 additions and 8 deletions
+7 -3
View File
@@ -2,6 +2,7 @@
fetchFromGitHub,
fetchpatch,
gns3-gui,
gns3-server,
lib,
python3Packages,
qt6,
@@ -68,9 +69,12 @@ python3Packages.buildPythonApplication rec {
export QT_QPA_PLATFORM=offscreen
'';
passthru.tests.version = testers.testVersion {
package = gns3-gui;
command = "${lib.getExe gns3-gui} --version";
passthru = {
tests.version = testers.testVersion {
package = gns3-gui;
command = "${lib.getExe gns3-gui} --version";
};
inherit (gns3-server.passthru) updateScript;
};
meta = {
+17 -5
View File
@@ -9,6 +9,7 @@
testers,
util-linux,
writableTmpDirAsHomeHook,
writeScript,
}:
python3Packages.buildPythonApplication rec {
@@ -84,12 +85,23 @@ python3Packages.buildPythonApplication rec {
"tests/controller/test_project.py"
];
passthru.tests = {
inherit (nixosTests) gns3-server;
version = testers.testVersion {
package = gns3-server;
command = "${lib.getExe gns3-server} --version";
passthru = {
tests = {
inherit (nixosTests) gns3-server;
version = testers.testVersion {
package = gns3-server;
command = "${lib.getExe gns3-server} --version";
};
};
updateScript = writeScript "update-gns3" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
set -eu -o pipefail
nix-update gns3-gui --version-regex '^v(2\.[\d\.]+)$' --commit
nix-update gns3-server --version-regex '^v(2\.[\d\.]+)$' --commit
'';
};
meta = {