pkgs: Add push-to-talk fix

This commit is contained in:
traxys 2024-04-14 00:17:12 +02:00
parent c5079e7ddc
commit 9ffd88ed26
2 changed files with 42 additions and 0 deletions

View file

@ -17,4 +17,5 @@
perseus-cli = callPackage ./perseus {inherit bonnie;};
flex-launcher = callPackage ./flex-launcher.nix {};
mesonlsp = callPackage ./mesonlsp {};
push-to-talk = callPackage ./push-to-talk.nix {};
}

41
pkgs/push-to-talk.nix Normal file
View file

@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
libevdev,
xdotool,
xorg,
}:
stdenv.mkDerivation {
pname = "wayland-push-to-talk-fix";
version = "unstable-2023-12-19";
src = fetchFromGitHub {
owner = "Rush";
repo = "wayland-push-to-talk-fix";
rev = "490f43054453871fe18e7d7e9041cfbd0f1d9b7d";
hash = "sha256-ZRSgrQHnNdEF2PyaflmI5sUoKCxtZ0mQY/bb/9PH64c=";
};
nativeBuildInputs = [pkg-config];
buildInputs = [libevdev xdotool xorg.libX11.dev];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -m 755 push-to-talk $out/bin
runHook postInstall
'';
meta = with lib; {
description = "This fixes the inability to use push to talk in Discord when running Wayland";
homepage = "https://github.com/Rush/wayland-push-to-talk-fix";
license = licenses.mit;
maintainers = with maintainers; [traxys];
mainProgram = "wayland-push-to-talk-fix";
platforms = platforms.all;
};
}