diff --git a/pkgs/tools/misc/ckb/ckb-modprobe.patch b/pkgs/tools/misc/ckb/ckb-modprobe.patch new file mode 100644 index 000000000000..8024151159cf --- /dev/null +++ b/pkgs/tools/misc/ckb/ckb-modprobe.patch @@ -0,0 +1,13 @@ +diff --git a/src/ckb-daemon/usb_linux.c b/src/ckb-daemon/usb_linux.c +index 8673f86..4714305 100644 +--- a/src/ckb-daemon/usb_linux.c ++++ b/src/ckb-daemon/usb_linux.c +@@ -440,7 +440,7 @@ static void udev_enum(){ + + int usbmain(){ + // Load the uinput module (if it's not loaded already) +- if(system("modprobe uinput") != 0) ++ if(system("@kmod@/bin/modprobe uinput") != 0) + ckb_warn("Failed to load uinput module\n"); + + // Create the udev object diff --git a/pkgs/tools/misc/ckb/default.nix b/pkgs/tools/misc/ckb/default.nix index a0dbc6fd4fe9..6ea31f434f23 100644 --- a/pkgs/tools/misc/ckb/default.nix +++ b/pkgs/tools/misc/ckb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, libudev, pkgconfig, qtbase, qmake, zlib }: +{ stdenv, fetchFromGitHub, substituteAll, libudev, pkgconfig, qtbase, qmake, zlib, kmod }: stdenv.mkDerivation rec { version = "0.2.8"; @@ -24,6 +24,11 @@ stdenv.mkDerivation rec { patches = [ ./ckb-animations-location.patch + (substituteAll { + name = "ckb-modprobe.patch"; + src = ./ckb-modprobe.patch; + inherit kmod; + }) ]; doCheck = false;