diff --git a/subprojects/wrapper-manager-fds/tests/configs/default.nix b/subprojects/wrapper-manager-fds/tests/configs/default.nix index 9aac2c62..4f1032dd 100644 --- a/subprojects/wrapper-manager-fds/tests/configs/default.nix +++ b/subprojects/wrapper-manager-fds/tests/configs/default.nix @@ -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 ]; }; diff --git a/subprojects/wrapper-manager-fds/tests/configs/xdg-desktop-entry.nix b/subprojects/wrapper-manager-fds/tests/configs/xdg-desktop-entry.nix new file mode 100644 index 00000000..4170985a --- /dev/null +++ b/subprojects/wrapper-manager-fds/tests/configs/xdg-desktop-entry.nix @@ -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 + ''; + }; + +}