let pkgs = import {}; in pkgs.stdenv.mkDerivation { pname = "libinput-scroll-emulation"; version = "1.0.0"; buildInputs = [ pkgs.libinput ]; src = pkgs.fetchFromGitHub { owner = "PeterCxy"; repo = "scroll-emulation"; rev = "e5f0332a860ddca8b1dd647403fc99d96247f804"; sha256 = "13dwa6jij8d4maq7chvmkxazp8mrd5mfm0lcfb94r914da8a6dxf"; }; buildPhase = '' make CFLAGS='-shared -ldl -linput -fPIC' hook ''; installPhase = '' mkdir -p $out/lib mv ./hook $out/lib/scroll-hook.so ''; meta = with pkgs.stdenv.lib; { homepage = "https://github.com/PeterCxy/scroll-emulation"; description = "A simple hack to use middle button scrolling emulation under GNOME Wayland (and other Wayland compositors that do not expose libinput configuration)."; license = licenses.free; # Derivative of GPL platforms = platforms.all; }; }