nixos/tests/nyxt: init

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards 2025-07-23 19:53:12 -04:00
commit 1522cd7cac
No known key found for this signature in database
GPG key ID: D83DC5377393C7E6
3 changed files with 38 additions and 0 deletions

View file

@ -1077,6 +1077,7 @@ in
ntpd-rs = runTest ./ntpd-rs.nix;
nvidia-container-toolkit = runTest ./nvidia-container-toolkit.nix;
nvmetcfg = runTest ./nvmetcfg.nix;
nyxt = runTest ./nyxt.nix;
nzbget = runTest ./nzbget.nix;
nzbhydra2 = runTest ./nzbhydra2.nix;
ocis = runTest ./ocis.nix;

35
nixos/tests/nyxt.nix Normal file
View file

@ -0,0 +1,35 @@
{
pkgs,
lib,
...
}:
{
name = "nyxt";
meta.maintainers = with lib.maintainers; [ ethancedwards8 ];
nodes.machine = {
imports = [
# sets up x11 with autologin
./common/x11.nix
];
environment.systemPackages = with pkgs; [ nyxt ];
# not enough memory for the allocation
virtualisation.memorySize = 2048;
};
enableOCR = true;
testScript =
{ nodes, ... }:
''
start_all()
machine.wait_for_x()
with subtest("Wait until Nyxt has finished loading the Valgrind docs page"):
machine.execute("xterm -e 'nyxt file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &");
machine.wait_for_window("nyxt")
'';
}

View file

@ -28,6 +28,7 @@
xclip,
wl-clipboard,
nix-update-script,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
@ -104,6 +105,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
updateScript = nix-update-script { };
tests = { inherit (nixosTests) nyxt; };
};
meta = with lib; {