From 3fdeef8a7ee81787a099cfb57bd91f24c5ec587d Mon Sep 17 00:00:00 2001
From: Have a good time <i@niconiconi.xyz>
Date: Mon, 27 Dec 2021 17:08:27 +0800
Subject: [PATCH] emacs: Add withXinput2 argument

---
 pkgs/applications/editors/emacs/generic.nix | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix
index bb899bf3de1c..49ecbbab4a3c 100644
--- a/pkgs/applications/editors/emacs/generic.nix
+++ b/pkgs/applications/editors/emacs/generic.nix
@@ -26,6 +26,7 @@
 , siteStart ? ./site-start.el
 , nativeComp ? false
 , withPgtk ? false
+, withXinput2 ? false
 , withImageMagick ? lib.versionOlder version "27" && (withX || withNS)
 , toolkit ? (
   if withGTK2 then "gtk2"
@@ -152,6 +153,7 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
     ++ lib.optional nativeComp "--with-native-compilation"
     ++ lib.optional withImageMagick "--with-imagemagick"
     ++ lib.optional withPgtk "--with-pgtk"
+    ++ lib.optional withXinput2 "--with-xinput2"
   ;
 
   installTargets = [ "tags" "install" ];