wrapper-manager-fds/modules: update makeWrapper names to be more proper

This commit is contained in:
Gabriel Arazas 2024-08-02 11:54:30 +08:00
parent d7338a8722
commit c3cdc27721
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -53,10 +53,13 @@
build = { build = {
toplevel = toplevel =
let let
makeWrapperArg0 =
if config.build.isBinary then "makeBinaryWrapper" else "makeShellWrapper";
mkWrapBuild = mkWrapBuild =
wrappers: wrappers:
lib.concatMapStrings (v: '' lib.concatMapStrings (v: ''
makeWrapper "${v.arg0}" "${builtins.placeholder "out"}/bin/${v.executableName}" ${lib.concatStringsSep " " v.makeWrapperArgs} ${makeWrapperArg0} "${v.arg0}" "${builtins.placeholder "out"}/bin/${v.executableName}" ${lib.concatStringsSep " " v.makeWrapperArgs}
'') wrappers; '') wrappers;
mkDesktopEntries = desktopEntries: builtins.map (entry: pkgs.makeDesktopItem entry) desktopEntries; mkDesktopEntries = desktopEntries: builtins.map (entry: pkgs.makeDesktopItem entry) desktopEntries;
@ -69,7 +72,7 @@
name = "wrapper-manager-fds-wrapped-package"; name = "wrapper-manager-fds-wrapped-package";
paths = desktopEntries ++ config.basePackages; paths = desktopEntries ++ config.basePackages;
nativeBuildInputs = nativeBuildInputs =
if config.build.isBinary then [ pkgs.makeBinaryWrapper ] else [ pkgs.makeWrapper ]; if config.build.isBinary then [ pkgs.makeBinaryWrapper ] else [ pkgs.makeShellWrapper ];
postBuild = '' postBuild = ''
${config.build.extraSetup} ${config.build.extraSetup}
${mkWrapBuild (lib.attrValues config.wrappers)} ${mkWrapBuild (lib.attrValues config.wrappers)}