1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-05 16:26:58 +00:00

hyprland: use package stubs

Reducing closure size for tests.
This commit is contained in:
Austin Horstman 2025-01-30 18:03:51 -06:00
parent 9afd022013
commit 801ddd8693
8 changed files with 37 additions and 19 deletions

View file

@ -0,0 +1,21 @@
{ config, lib, ... }: {
# Avoid unnecessary downloads in CI jobs and/or make out paths constant, i.e.,
# not containing hashes, version numbers etc.
test.stubs = {
xdg-desktop-portal = { };
xwayland = { };
};
nixpkgs.overlays = [
(_final: _prev: {
dbus = config.lib.test.mkStubPackage { name = "dbus"; };
hyprland = lib.makeOverridable
(attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { };
xdg-desktop-portal-hyprland = lib.makeOverridable (_:
config.lib.test.mkStubPackage { name = "xdg-desktop-portal-hyprland"; })
{ };
systemd =
lib.makeOverridable (_attrs: config.lib.test.mkStubPackage { }) { };
})
];
}

View file

@ -1,10 +1,6 @@
{ config, lib, ... }:
{
{ config, ... }: {
wayland.windowManager.hyprland = {
enable = true;
package = lib.makeOverridable
(attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { };
plugins =
[ "/path/to/plugin1" (config.lib.test.mkStubPackage { name = "foo"; }) ];
};

View file

@ -1,10 +1,8 @@
{ config, lib, ... }:
{ config, ... }: {
imports = [ ./hyprland-stubs.nix ];
{
wayland.windowManager.hyprland = {
enable = true;
package = lib.makeOverridable
(attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { };
plugins =
[ "/path/to/plugin1" (config.lib.test.mkStubPackage { name = "foo"; }) ];
settings = {

View file

@ -1,4 +1,6 @@
{ ... }: {
imports = [ ./hyprland-stubs.nix ];
wayland.windowManager.hyprland = {
enable = true;
package = null;

View file

@ -1,4 +1,6 @@
{ ... }: {
{
imports = [ ./hyprland-stubs.nix ];
wayland.windowManager.hyprland = {
enable = true;
package = null;

View file

@ -1,6 +1,9 @@
{ ... }: {
{
imports = [ ./hyprland-stubs.nix ];
wayland.windowManager.hyprland = {
enable = true;
portalPackage = null;
settings = {

View file

@ -1,10 +1,8 @@
{ config, lib, ... }:
{ config, ... }: {
imports = [ ./hyprland-stubs.nix ];
{
wayland.windowManager.hyprland = {
enable = true;
package = lib.makeOverridable
(attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { };
plugins =
[ "/path/to/plugin1" (config.lib.test.mkStubPackage { name = "foo"; }) ];
settings = {

View file

@ -1,10 +1,8 @@
{ config, lib, ... }:
{
imports = [ ./hyprland-stubs.nix ];
wayland.windowManager.hyprland = {
enable = true;
package = lib.makeOverridable
(attrs: config.lib.test.mkStubPackage { name = "hyprland"; }) { };
settings = {
source = [ "sourced.conf" ];