This commit is contained in:
NeoTheFox 2020-11-01 20:55:39 +03:00
commit 52fe1c51a0

31
default.nix Normal file
View File

@ -0,0 +1,31 @@
let
pkgs = import <nixpkgs> {};
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;
};
}