diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix b/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix new file mode 100644 index 000000000000..35bb3ad15837 --- /dev/null +++ b/nixpkgs/pkgs/applications/window-managers/wayfire/wrapper.nix @@ -0,0 +1,32 @@ +{ symlinkJoin, lib, makeWrapper, wayfire, plugins ? [ ] }: + +symlinkJoin { + name = "wayfire-wrapped-${lib.getVersion wayfire}"; + + nativeBuildInputs = [ makeWrapper ]; + + paths = [ + wayfire + ] ++ plugins; + + 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 + ''; + + preferLocalBuild = true; + + passthru = wayfire.passthru // { + unwrapped = wayfire; + }; + + meta = wayfire.meta // { + # To prevent builds on hydra + hydraPlatforms = []; + # prefer wrapper over the package + priority = (wayfire.meta.priority or 0) - 1; + }; +} |