summaryrefslogtreecommitdiffstats
path: root/nixos/tests/installed-tests/xdg-desktop-portal.nix
blob: dabc2fb306e04d826dcf27e7fbf3642436997464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
  lib,
  pkgs,
  makeInstalledTest,
  ...
}:

makeInstalledTest {
  tested = pkgs.xdg-desktop-portal;

  testConfig = {
    environment.variables = {
      GI_TYPELIB_PATH = lib.makeSearchPath "lib/girepository-1.0" [
        pkgs.glib.out
        pkgs.umockdev.out
      ];
      # need to set this ourselves, because the tests will set LD_PRELOAD=libumockdev-preload.so,
      # which can't be found because it's not in default rpath
      LD_PRELOAD = "${pkgs.umockdev.out}/lib/libumockdev-preload.so";
      XDP_TEST_IN_CI = 1;
    };
    environment.systemPackages = with pkgs; [
      umockdev
      wireless-regdb
      bubblewrap
    ];
    services.geoclue2 = {
      enable = true;
      enableDemoAgent = true;
    };
    location.provider = "geoclue2";
  };
}