commit 52fe1c51a061fcf1d2d859f7e3aa96c6711f0153 Author: NeoTheFox Date: Sun Nov 1 20:55:39 2020 +0300 initial diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..0621243 --- /dev/null +++ b/default.nix @@ -0,0 +1,31 @@ +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; + }; +}