wrapper-manager-fds/modules: force generated desktop files into path

`pkgs.symlinkJoin` probably doesn't like that but for now, this will do.
This commit is contained in:
Gabriel Arazas 2024-07-11 17:30:40 +08:00
parent fa0402272f
commit 7410f1a07b

View File

@ -39,21 +39,21 @@
mkDesktopEntries = desktopEntries: mkDesktopEntries = desktopEntries:
builtins.map (entry: pkgs.makeDesktopItem entry) desktopEntries; builtins.map (entry: pkgs.makeDesktopItem entry) desktopEntries;
desktopEntries =
mkDesktopEntries (lib.attrValues config.xdg.desktopEntries);
in in
pkgs.symlinkJoin { pkgs.symlinkJoin {
name = "wrapper-manager-fds-wrapped-package"; name = "wrapper-manager-fds-wrapped-package";
paths = config.basePackages; paths = desktopEntries ++ config.basePackages;
nativeBuildInputs = nativeBuildInputs =
if config.build.isBinary if config.build.isBinary
then [ pkgs.makeBinaryWrapper ] then [ pkgs.makeBinaryWrapper ]
else [ pkgs.makeWrapper ] else [ pkgs.makeWrapper ];
++ lib.optionals (pkgs.stdenv.isLinux && config.xdg.desktopEntries != { }) [ pkgs.copyDesktopItems ];
postBuild = '' postBuild = ''
${config.build.extraSetup} ${config.build.extraSetup}
${mkWrapBuild (lib.attrValues config.wrappers)} ${mkWrapBuild (lib.attrValues config.wrappers)}
''; '';
desktopItems =
mkDesktopEntries (lib.attrValues config.xdg.desktopEntries);
}; };
}; };
}; };