mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
pkgs/kat-ckb: Workaround for ckb-next update
This commit is contained in:
parent
5e3525b2c3
commit
019ea08fe0
4 changed files with 65 additions and 1 deletions
|
|
@ -49,6 +49,11 @@
|
|||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
hardware.ckb-next = {
|
||||
enable = true;
|
||||
package = pkgs.kat-ckb;
|
||||
};
|
||||
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
systemd.timers.kat-glauca-dns = {
|
||||
|
|
@ -63,7 +68,7 @@
|
|||
# graphics tablet
|
||||
services.xserver.wacom.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.idevicerestore ];
|
||||
environment.systemPackages = [ pkgs.idevicerestore pkgs.kat-ckb ];
|
||||
|
||||
# other stuffs
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,26 @@ let
|
|||
|
||||
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-website = super.callPackage ./kat-website { };
|
||||
|
|
|
|||
13
pkgs/kat-ckb/install-dirs.patch
Normal file
13
pkgs/kat-ckb/install-dirs.patch
Normal 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
|
||||
26
pkgs/kat-ckb/modprobe.patch
Normal file
26
pkgs/kat-ckb/modprobe.patch
Normal 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";
|
||||
Loading…
Add table
Add a link
Reference in a new issue