2023-08-04 22:07:22 +00:00
|
|
|
{ symlinkJoin, lib, makeWrapper, wayfire, plugins ? [ ] }:
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
symlinkJoin {
|
|
|
|
name = "wayfire-wrapped-${lib.getVersion wayfire}";
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
paths = [
|
|
|
|
wayfire
|
|
|
|
] ++ plugins;
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
postBuild = ''
|
|
|
|
for binary in $out/bin/*; do
|
|
|
|
wrapProgram $binary \
|
|
|
|
--prefix WAYFIRE_PLUGIN_PATH : $out/lib/wayfire \
|
|
|
|
--prefix WAYFIRE_PLUGIN_XML_PATH : $out/share/wayfire/metadata
|
|
|
|
done
|
|
|
|
'';
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
preferLocalBuild = true;
|
2020-12-25 13:55:36 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
passthru = wayfire.passthru // {
|
|
|
|
unwrapped = wayfire;
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = wayfire.meta // {
|
|
|
|
# To prevent builds on hydra
|
|
|
|
hydraPlatforms = [];
|
|
|
|
# prefer wrapper over the package
|
2024-09-19 14:19:46 +00:00
|
|
|
priority = (wayfire.meta.priority or lib.meta.defaultPriority) - 1;
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
}
|