aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMaximilian Huber <maximilian.huber@tngtech.com>2024-12-26 15:44:07 +0100
committerGitHub <noreply@github.com>2024-12-26 14:44:07 +0000
commitfa2bace3cd0168af24c8dcd4a59db59a0017da90 (patch)
tree1a2b746b997c9a287d844ccf98494d05347c4794 /flake.nix
parent955039b5ea07c3fb2ff3278c0543004d86b7dcc7 (diff)
downloadniri-fa2bace3cd0168af24c8dcd4a59db59a0017da90.tar.gz
niri-fa2bace3cd0168af24c8dcd4a59db59a0017da90.tar.bz2
niri-fa2bace3cd0168af24c8dcd4a59db59a0017da90.zip
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 <gh@maxhbr.de>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 9 insertions, 0 deletions
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