halloy: run under wayland, if available

Allows halloy to use it's wayland backend, if available.
This commit is contained in:
a-kenji 2024-02-15 11:46:09 +01:00
parent bfa8b30043
commit 9cd71e54a3

View File

@ -72,6 +72,15 @@ rustPlatform.buildRustPackage rec {
})
];
postFixup = lib.optional stdenv.isLinux (
let
rpathWayland = lib.makeLibraryPath [ wayland vulkan-loader libxkbcommon ];
in
''
rpath=$(patchelf --print-rpath $out/bin/halloy)
patchelf --set-rpath "$rpath:${rpathWayland}" $out/bin/halloy
'');
postInstall = ''
install -Dm644 assets/linux/org.squidowl.halloy.png $out/share/icons/hicolor/128x128/apps/org.squidowl.halloy.png
'';