mirror of
https://github.com/foo-dogsquared/nix-module-wrapper-manager-fds.git
synced 2025-02-07 06:19:02 +00:00
wrapper-manager-fds/lib: add arg0 argument for mkWrappedPackage
Time to figure out if this is a good idea.
This commit is contained in:
parent
cf9e4c0c20
commit
393465ec47
@ -37,6 +37,7 @@
|
|||||||
mkWrappedPackage = {
|
mkWrappedPackage = {
|
||||||
package,
|
package,
|
||||||
executableName ? package.meta.mainProgram or package.pname,
|
executableName ? package.meta.mainProgram or package.pname,
|
||||||
|
arg0 ? executableName,
|
||||||
extraPackages ? [ ],
|
extraPackages ? [ ],
|
||||||
isBinary ? true,
|
isBinary ? true,
|
||||||
|
|
||||||
@ -48,7 +49,7 @@
|
|||||||
pkgs.symlinkJoin (
|
pkgs.symlinkJoin (
|
||||||
(builtins.removeAttrs args [ "package" "executableName" "extraPackages" "isBinary" ])
|
(builtins.removeAttrs args [ "package" "executableName" "extraPackages" "isBinary" ])
|
||||||
// {
|
// {
|
||||||
name = "wrapper-manager-wrapped-package-${package.pname}";
|
name = "wrapper-manager-wrapped-packages";
|
||||||
paths = [ package ] ++ extraPackages;
|
paths = [ package ] ++ extraPackages;
|
||||||
|
|
||||||
inherit makeWrapperArgs;
|
inherit makeWrapperArgs;
|
||||||
@ -59,7 +60,7 @@
|
|||||||
};
|
};
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
${postBuild}
|
${postBuild}
|
||||||
wrapProgram "$out/bin/${executableName}" ''${makeWrapperArgs[@]}
|
makeWrapper "$out/bin/${arg0}" "$out/bin/${executableName}" ''${makeWrapperArgs[@]}
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
})
|
})
|
||||||
else
|
else
|
||||||
wrapperManagerLib.mkWrappedPackage (config.build.extraArgs // {
|
wrapperManagerLib.mkWrappedPackage (config.build.extraArgs // {
|
||||||
inherit (config) package executableName;
|
inherit (config) arg0 package executableName;
|
||||||
inherit (config.build) isBinary makeWrapperArgs;
|
inherit (config.build) isBinary makeWrapperArgs;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user