forge
Explore
Log in

Don't you dare go Hollow

Fix nix flake for client-server tests (#896)

Browse files at this commit

fa2bace3cd0168af24c8dcd4a59db59a0017da90UnverifiedMaximilian HuberParent: 955039b
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 <gh@maxhbr.de>
flake.nixmodified+9 -0
@@ -106,6 +106,15 @@
106106 ++ lib.optional withSystemd "systemd";
107107 buildNoDefaultFeatures = true;
108108
109+ # ever since this commit:
110+ # https://github.com/YaLTeR/niri/commit/771ea1e81557ffe7af9cbdbec161601575b64d81
111+ # niri now runs an actual instance of the real compositor (with a mock backend) during tests
112+ # and thus creates a real socket file in the runtime dir.
113+ # this is fine for our build, we just need to make sure it has a directory to write to.
114+ preCheck = ''
115+ export XDG_RUNTIME_DIR="$(mktemp -d)"
116+ '';
117+
109118 postInstall =
110119 ''
111120 install -Dm644 resources/niri.desktop -t $out/share/wayland-sessions