Test that an update keeps upgraded packages

The update test upgrades nixpkgs first; the pin and the lock must survive
a rolled-back update, a confirmed one and the rebuild after it. The channel
server moves to the shared test helpers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV9dZrK6nipHkPfyM4F
This commit is contained in:
2026-11-18 08:32:13 +01:00
co-authored by Claude Sonnet 5.5
parent 7b3a83ba0b
commit 6e097b7473
3 changed files with 67 additions and 23 deletions
+24
View File
@@ -15,6 +15,30 @@
];
};
# channels.nixos.org as a test sees it: `<branch>/git-revision` is a redirect to
# /files/<branch>/git-revision, served from /srv/channels on port 8080.
channelServer =
pkgs:
pkgs.writeScript "channels.py" ''
#!${pkgs.python3}/bin/python3
import http.server
class Handler(http.server.SimpleHTTPRequestHandler):
def __init__(self, *args, **kwargs):
super().__init__(*args, directory="/srv/channels", **kwargs)
def do_GET(self):
parts = self.path.strip("/").split("/")
if len(parts) == 2 and parts[1] == "git-revision":
self.send_response(302)
self.send_header("Location", "/files/" + self.path.strip("/"))
self.end_headers()
else:
super().do_GET()
http.server.ThreadingHTTPServer(("0.0.0.0", 8080), Handler).serve_forever()
'';
# `driverInteractive` uses the full QEMU, which would open a window per VM;
# `nix run .#lab` wants the consoles in the terminal instead.
interactiveDefaults.virtualisation.qemu.options = [