nixos-config/tests/lib/xdg.nix
Gabriel Arazas 48949336ff
lib: init XDG-specific subset
This is arguably more suitable for certain environment but Nix ecosystem
is already largely Unix-adjacent anyways.
2025-03-20 08:55:05 +08:00

15 lines
479 B
Nix

{ pkgs, lib, self }:
lib.runTests {
testGetXdgDesktop = {
expr = self.xdg.getXdgDesktop pkgs.wezterm "org.wezfurlong.wezterm";
expected = "${pkgs.wezterm}/share/applications/org.wezfurlong.wezterm.desktop";
};
# This should be a naive function so it should just naively get things.
testGetXdgDesktop2 = {
expr = self.xdg.getXdgDesktop pkgs.hello "non-existing-desktop";
expected = "${pkgs.hello}/share/applications/non-existing-desktop.desktop";
};
}