mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 00:53:55 -05:00
nixos: added webcord overlay for wayland ime
This commit is contained in:
parent
aafdcada58
commit
badf800960
|
@ -1,6 +1,7 @@
|
|||
inputs: {
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
|
@ -12,4 +13,32 @@ inputs: {
|
|||
./system
|
||||
./user
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
webcord = prev.webcord.overrideAttrs (old: {
|
||||
installPhase = let
|
||||
binPath = lib.makeBinPath [pkgs.xdg-utils];
|
||||
in ''
|
||||
runHook preInstall
|
||||
|
||||
# Remove dev deps that aren't necessary for running the app
|
||||
npm prune --omit=dev
|
||||
|
||||
mkdir -p $out/lib/node_modules/webcord
|
||||
cp -r app node_modules sources package.json $out/lib/node_modules/webcord/
|
||||
|
||||
install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
|
||||
|
||||
# Add xdg-utils to path via suffix, per PR #181171
|
||||
makeWrapper '${lib.getExe pkgs.electron}' $out/bin/webcord \
|
||||
--suffix PATH : "${binPath}" \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime}}" \
|
||||
--add-flags $out/lib/node_modules/webcord/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue