From 9afd02201332756d4bbad273202ecc96049c53b2 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 30 Jan 2025 18:59:05 -0600 Subject: [PATCH] wayfire-stubs: add stubs for wayfire tests Reducing closure from 500MB to 357MB --- .../window-managers/wayfire/configuration.nix | 2 ++ .../window-managers/wayfire/wayfire-stubs.nix | 13 +++++++++++++ .../services/window-managers/wayfire/wf-shell.nix | 2 ++ 3 files changed, 17 insertions(+) create mode 100644 tests/modules/services/window-managers/wayfire/wayfire-stubs.nix diff --git a/tests/modules/services/window-managers/wayfire/configuration.nix b/tests/modules/services/window-managers/wayfire/configuration.nix index 07042329..d199e920 100644 --- a/tests/modules/services/window-managers/wayfire/configuration.nix +++ b/tests/modules/services/window-managers/wayfire/configuration.nix @@ -1,4 +1,6 @@ { ... }: { + imports = [ ./wayfire-stubs.nix ]; + wayland.windowManager.wayfire = { enable = true; package = null; diff --git a/tests/modules/services/window-managers/wayfire/wayfire-stubs.nix b/tests/modules/services/window-managers/wayfire/wayfire-stubs.nix new file mode 100644 index 00000000..0fd2bf85 --- /dev/null +++ b/tests/modules/services/window-managers/wayfire/wayfire-stubs.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: { + # Avoid unnecessary downloads in CI jobs and/or make out paths constant, i.e., + # not containing hashes, version numbers etc. + test.stubs = { wayfire = { }; }; + + nixpkgs.overlays = [ + (_final: _prev: { + dbus = config.lib.test.mkStubPackage { name = "dbus"; }; + systemd = + lib.makeOverridable (_attrs: config.lib.test.mkStubPackage { }) { }; + }) + ]; +} diff --git a/tests/modules/services/window-managers/wayfire/wf-shell.nix b/tests/modules/services/window-managers/wayfire/wf-shell.nix index 2c8221d8..f88761db 100644 --- a/tests/modules/services/window-managers/wayfire/wf-shell.nix +++ b/tests/modules/services/window-managers/wayfire/wf-shell.nix @@ -1,4 +1,6 @@ { pkgs, ... }: { + imports = [ ./wayfire-stubs.nix ]; + wayland.windowManager.wayfire = { enable = true; package = null;