wrapper-manager-fds/lib: add arg0 argument for mkWrappedPackage

Time to figure out if this is a good idea.
This commit is contained in:
Gabriel Arazas 2024-07-03 23:19:22 +08:00
parent cf9e4c0c20
commit 393465ec47
2 changed files with 4 additions and 3 deletions

View File

@ -37,6 +37,7 @@
mkWrappedPackage = {
package,
executableName ? package.meta.mainProgram or package.pname,
arg0 ? executableName,
extraPackages ? [ ],
isBinary ? true,
@ -48,7 +49,7 @@
pkgs.symlinkJoin (
(builtins.removeAttrs args [ "package" "executableName" "extraPackages" "isBinary" ])
// {
name = "wrapper-manager-wrapped-package-${package.pname}";
name = "wrapper-manager-wrapped-packages";
paths = [ package ] ++ extraPackages;
inherit makeWrapperArgs;
@ -59,7 +60,7 @@
};
postBuild = ''
${postBuild}
wrapProgram "$out/bin/${executableName}" ''${makeWrapperArgs[@]}
makeWrapper "$out/bin/${arg0}" "$out/bin/${executableName}" ''${makeWrapperArgs[@]}
'';
});
}

View File

@ -82,7 +82,7 @@
})
else
wrapperManagerLib.mkWrappedPackage (config.build.extraArgs // {
inherit (config) package executableName;
inherit (config) arg0 package executableName;
inherit (config.build) isBinary makeWrapperArgs;
});
};