From fa2bace3cd0168af24c8dcd4a59db59a0017da90 Mon Sep 17 00:00:00 2001 From: Maximilian Huber Date: Thu, 26 Dec 2024 15:44:07 +0100 Subject: Fix nix flake for client-server tests (#896) This was suggested by @sodiboo in https://github.com/YaLTeR/niri/issues/894#issuecomment-2562153840 and was copied from https://github.com/sodiboo/niri-flake/commit/350e6b68c70f5002a75e10521f5e66ace4b5eed1i Signed-off-by: Maximilian Huber --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 1a7319a1..ebb2a05d 100644 --- a/flake.nix +++ b/flake.nix @@ -106,6 +106,15 @@ ++ lib.optional withSystemd "systemd"; buildNoDefaultFeatures = true; + # ever since this commit: + # https://github.com/YaLTeR/niri/commit/771ea1e81557ffe7af9cbdbec161601575b64d81 + # niri now runs an actual instance of the real compositor (with a mock backend) during tests + # and thus creates a real socket file in the runtime dir. + # this is fine for our build, we just need to make sure it has a directory to write to. + preCheck = '' + export XDG_RUNTIME_DIR="$(mktemp -d)" + ''; + postInstall = '' install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions -- cgit