mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-01-30 22:57:58 +00:00
wrapper-manager-fds/tests: add test config for XDG desktop entries
This commit is contained in:
parent
5a04d1670b
commit
a6f448348d
@ -15,6 +15,7 @@ in
|
||||
modules = [ ./wrapper-neofetch.nix ];
|
||||
specialArgs.yourMomName = "Yor mom";
|
||||
};
|
||||
xdg-desktop-entry = build { modules = [ ./xdg-desktop-entry.nix ]; };
|
||||
single-basepackage = build { modules = [ ./single-basepackage.nix ]; };
|
||||
neofetch-with-additional-files = build { modules = [ ./neofetch-with-additional-files.nix ]; };
|
||||
lib-modules-make-wraparound = build { modules = [ ./lib-modules-subset/make-wraparound.nix ]; };
|
||||
|
42
tests/configs/xdg-desktop-entry.nix
Normal file
42
tests/configs/xdg-desktop-entry.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
wrappers.nvim = {
|
||||
arg0 = lib.getExe' pkgs.neovim "nvim";
|
||||
xdg.desktopEntry = {
|
||||
enable = true;
|
||||
settings = {
|
||||
terminal = true;
|
||||
extraConfig."X-GNOME-Autostart-Phase" = "WindowManager";
|
||||
keywords = [ "Text editor" ];
|
||||
startupNotify = false;
|
||||
startupWMClass = "MyOwnClass";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.desktopEntries.nvim-custom = {
|
||||
name = "nvim-custom";
|
||||
genericName = "Text editor";
|
||||
terminal = true;
|
||||
exec = "nvim";
|
||||
};
|
||||
|
||||
build.extraPassthru.wrapperManagerTests = {
|
||||
actuallyBuilt =
|
||||
let
|
||||
wrapper = config.build.toplevel;
|
||||
in
|
||||
pkgs.runCommand "wrapper-manager-xdg-desktop-entry-actually-built" { } ''
|
||||
[ -e "${wrapper}/share/applications/nvim-custom.desktop" ] \
|
||||
&& [ -e "${wrapper}/share/applications/nvim.desktop" ] \
|
||||
&& [ -x "${wrapper}/bin/${config.wrappers.nvim.executableName}" ] && touch $out
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user