pkgs/kat-ckb: Workaround for ckb-next update

This commit is contained in:
kat witch 2021-04-23 00:17:24 +01:00
parent 5e3525b2c3
commit 019ea08fe0
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
4 changed files with 65 additions and 1 deletions

View file

@ -49,6 +49,11 @@
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
}; };
hardware.ckb-next = {
enable = true;
package = pkgs.kat-ckb;
};
services.usbmuxd.enable = true; services.usbmuxd.enable = true;
systemd.timers.kat-glauca-dns = { systemd.timers.kat-glauca-dns = {
@ -63,7 +68,7 @@
# graphics tablet # graphics tablet
services.xserver.wacom.enable = true; services.xserver.wacom.enable = true;
environment.systemPackages = [ pkgs.idevicerestore ]; environment.systemPackages = [ pkgs.idevicerestore pkgs.kat-ckb ];
# other stuffs # other stuffs
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View file

@ -30,6 +30,26 @@ let
screenstub = unstable.callPackage ./screenstub { }; screenstub = unstable.callPackage ./screenstub { };
kat-ckb = super.ckb-next.overrideAttrs (old: rec {
version = "0.4.4";
src = self.fetchFromGitHub {
owner = "ckb-next";
repo = "ckb-next";
rev = "v${version}";
sha256 = "1fgvh2hsrm8vqbqq9g45skhyyrhhka4d8ngmyldkldak1fgmrvb7";
};
buildInputs = old.buildInputs ++ [ self.xorg.libXdmcp self.qt5.qttools self.libsForQt5.qt5.qtx11extras self.libsForQt5.libdbusmenu ];
patches = [
./kat-ckb/install-dirs.patch
(self.substituteAll {
name = "ckb-next-modprobe.patch";
src = ./kat-ckb/modprobe.patch;
kmod = self.kmod;
})
];
});
kat-glauca-dns = unstable.callPackage ./kat-glauca-dns { inherit sources; }; kat-glauca-dns = unstable.callPackage ./kat-glauca-dns { inherit sources; };
kat-website = super.callPackage ./kat-website { }; kat-website = super.callPackage ./kat-website { };

View file

@ -0,0 +1,13 @@
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
index a04b80c..2969b3b 100644
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -437,7 +437,7 @@ if ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "launchd")
elseif ("${CKB_NEXT_INIT_SYSTEM}" STREQUAL "systemd")
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon.service"
- DESTINATION "${SYSTEMD_UNIT_INSTALL_DIR}"
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
PERMISSIONS
OWNER_READ OWNER_WRITE
GROUP_READ

View file

@ -0,0 +1,26 @@
diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
index 933e628..c4f97f2 100644
--- a/src/daemon/input_linux.c
+++ b/src/daemon/input_linux.c
@@ -70,7 +70,7 @@ int os_inputopen(usbdevice* kb){
// If not available, load the module
if(fd < 0){
- if(system("modprobe uinput") != 0) {
+ if(system("@kmod@/bin/modprobe uinput") != 0) {
ckb_fatal("Failed to load uinput module");
return 1;
}
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
index eeadaf8..87de71f 100644
--- a/src/gui/mainwindow.cpp
+++ b/src/gui/mainwindow.cpp
@@ -309,7 +309,7 @@ void MainWindow::updateVersion(){
#elif defined(Q_OS_LINUX)
if(!(QFileInfo("/dev/uinput").exists() || QFileInfo("/dev/input/uinput").exists())){
QProcess modprobe;
- modprobe.start("modprobe", QStringList("uinput"));
+ modprobe.start("@kmod@/bin/modprobe", QStringList("uinput"));
if(!modprobe.waitForFinished())
qDebug() << "Modprobe error";