Merge pull request #40043 from kierdavis/ckb-update-and-cleanup
ckb/ckb-next: 0.2.9 -> 0.3.2, and cleanup
This commit is contained in:
commit
2f668e3248
|
@ -197,6 +197,13 @@
|
||||||
these changes. Please review http://lucene.apache.org/solr/ carefully before upgrading.
|
these changes. Please review http://lucene.apache.org/solr/ carefully before upgrading.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Package <literal>ckb</literal> is renamed to <literal>ckb-next</literal>,
|
||||||
|
and options <literal>hardware.ckb.*</literal> are renamed to
|
||||||
|
<literal>hardware.ckb-next.*</literal>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,17 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.hardware.ckb;
|
cfg = config.hardware.ckb-next;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.hardware.ckb = {
|
options.hardware.ckb-next = {
|
||||||
enable = mkEnableOption "the Corsair keyboard/mouse driver";
|
enable = mkEnableOption "the Corsair keyboard/mouse driver";
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.ckb;
|
default = pkgs.ckb-next;
|
||||||
defaultText = "pkgs.ckb";
|
defaultText = "pkgs.ckb-next";
|
||||||
description = ''
|
description = ''
|
||||||
The package implementing the Corsair keyboard/mouse driver.
|
The package implementing the Corsair keyboard/mouse driver.
|
||||||
'';
|
'';
|
||||||
|
@ -23,12 +23,12 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.services.ckb = {
|
systemd.services.ckb-next = {
|
||||||
description = "Corsair Keyboard Daemon";
|
description = "Corsair Keyboards and Mice Daemon";
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
script = "${cfg.package}/bin/ckb-daemon";
|
script = "exec ${cfg.package}/bin/ckb-next-daemon";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "on-failure";
|
||||||
StandardOutput = "syslog";
|
StandardOutput = "syslog";
|
||||||
};
|
};
|
||||||
};
|
};
|
|
@ -34,7 +34,7 @@
|
||||||
./config/zram.nix
|
./config/zram.nix
|
||||||
./hardware/all-firmware.nix
|
./hardware/all-firmware.nix
|
||||||
./hardware/brightnessctl.nix
|
./hardware/brightnessctl.nix
|
||||||
./hardware/ckb.nix
|
./hardware/ckb-next.nix
|
||||||
./hardware/cpu/amd-microcode.nix
|
./hardware/cpu/amd-microcode.nix
|
||||||
./hardware/cpu/intel-microcode.nix
|
./hardware/cpu/intel-microcode.nix
|
||||||
./hardware/digitalbitbox.nix
|
./hardware/digitalbitbox.nix
|
||||||
|
|
|
@ -282,6 +282,10 @@ with lib;
|
||||||
(mkRenamedOptionModule [ "programs" "man" "enable" ] [ "documentation" "man" "enable" ])
|
(mkRenamedOptionModule [ "programs" "man" "enable" ] [ "documentation" "man" "enable" ])
|
||||||
(mkRenamedOptionModule [ "services" "nixosManual" "enable" ] [ "documentation" "nixos" "enable" ])
|
(mkRenamedOptionModule [ "services" "nixosManual" "enable" ] [ "documentation" "nixos" "enable" ])
|
||||||
|
|
||||||
|
# ckb
|
||||||
|
(mkRenamedOptionModule [ "hardware" "ckb" "enable" ] [ "hardware" "ckb-next" "enable" ])
|
||||||
|
(mkRenamedOptionModule [ "hardware" "ckb" "package" ] [ "hardware" "ckb-next" "package" ])
|
||||||
|
|
||||||
] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
|
] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter"
|
||||||
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
|
"jsonExporter" "minioExporter" "nginxExporter" "nodeExporter"
|
||||||
"snmpExporter" "unifiExporter" "varnishExporter" ]
|
"snmpExporter" "unifiExporter" "varnishExporter" ]
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
{ stdenv, fetchFromGitHub, substituteAll, udev
|
{ stdenv, fetchFromGitHub, substituteAll, udev
|
||||||
, pkgconfig, qtbase, qmake, zlib, kmod }:
|
, pkgconfig, qtbase, cmake, zlib, kmod }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.2.9";
|
version = "0.3.2";
|
||||||
name = "ckb-next-${version}";
|
name = "ckb-next-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ckb-next";
|
owner = "ckb-next";
|
||||||
repo = "ckb-next";
|
repo = "ckb-next";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0hl41znyhp3k5l9rcgz0gig36gsg95ivrs1dyngv45q9jkr6fchm";
|
sha256 = "0ri5n7r1vhsgk6s64abvqcdrs5fmlwprw0rxiwfy0j8a9qcic1dr";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -20,29 +20,19 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgconfig
|
pkgconfig
|
||||||
qmake
|
cmake
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./ckb-animations-location.patch
|
./install-dirs.patch
|
||||||
|
./systemd-service.patch
|
||||||
(substituteAll {
|
(substituteAll {
|
||||||
name = "ckb-modprobe.patch";
|
name = "ckb-next-modprobe.patch";
|
||||||
src = ./ckb-modprobe.patch;
|
src = ./modprobe.patch;
|
||||||
inherit kmod;
|
inherit kmod;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -D --mode 0755 --target-directory $out/bin bin/ckb-daemon bin/ckb
|
|
||||||
install -D --mode 0755 --target-directory $out/libexec/ckb-animations bin/ckb-animations/*
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Driver and configuration tool for Corsair keyboards and mice";
|
description = "Driver and configuration tool for Corsair keyboards and mice";
|
||||||
homepage = https://github.com/ckb-next/ckb-next;
|
homepage = https://github.com/ckb-next/ckb-next;
|
|
@ -0,0 +1,32 @@
|
||||||
|
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
|
||||||
|
index 09056a7..1bb4595 100644
|
||||||
|
--- a/src/daemon/CMakeLists.txt
|
||||||
|
+++ b/src/daemon/CMakeLists.txt
|
||||||
|
@@ -456,7 +456,7 @@ endif ()
|
||||||
|
if (LINUX)
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_SOURCE_DIR}/linux/udev/99-ckb-daemon.rules"
|
||||||
|
- DESTINATION "/etc/udev/rules.d"
|
||||||
|
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d"
|
||||||
|
PERMISSIONS
|
||||||
|
OWNER_READ OWNER_WRITE
|
||||||
|
GROUP_READ
|
||||||
|
diff --git a/src/libs/ckb-next/CMakeLists.txt b/src/libs/ckb-next/CMakeLists.txt
|
||||||
|
index ecc591c..35de563 100644
|
||||||
|
--- a/src/libs/ckb-next/CMakeLists.txt
|
||||||
|
+++ b/src/libs/ckb-next/CMakeLists.txt
|
||||||
|
@@ -75,12 +75,12 @@ if(NOT MACOS)
|
||||||
|
NAMESPACE
|
||||||
|
${CMAKE_PROJECT_NAME}::
|
||||||
|
DESTINATION
|
||||||
|
- "/usr/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
|
||||||
|
+ "${CMAKE_INSTALL_PREFIX}/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES
|
||||||
|
"cmake/${PROJECT_NAME}Config.cmake"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||||
|
DESTINATION
|
||||||
|
- "/usr/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
|
||||||
|
+ "${CMAKE_INSTALL_PREFIX}/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_NAME}")
|
||||||
|
endif()
|
|
@ -0,0 +1,26 @@
|
||||||
|
diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
|
||||||
|
index 1cedb07..8e0b24b 100644
|
||||||
|
--- a/src/daemon/input_linux.c
|
||||||
|
+++ b/src/daemon/input_linux.c
|
||||||
|
@@ -58,7 +58,7 @@ int os_inputopen(usbdevice* kb){
|
||||||
|
/// First check whether the uinput module is loaded by the kernel.
|
||||||
|
///
|
||||||
|
// Load the uinput module (if it's not loaded already)
|
||||||
|
- if(system("modprobe uinput") != 0) {
|
||||||
|
+ if(system("@kmod@/bin/modprobe uinput") != 0) {
|
||||||
|
ckb_fatal("Failed to load uinput module\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp
|
||||||
|
index 3601146..3f2f78f 100644
|
||||||
|
--- a/src/gui/mainwindow.cpp
|
||||||
|
+++ b/src/gui/mainwindow.cpp
|
||||||
|
@@ -251,7 +251,7 @@ void MainWindow::updateVersion(){
|
||||||
|
daemonWarning.append(tr("<br /><b>Warning:</b> System Extension by \"Fumihiko Takayama\" is not allowed in Security & Privacy. Please allow it and then unplug and replug your devices."));
|
||||||
|
#elif defined(Q_OS_LINUX)
|
||||||
|
QProcess modprobe;
|
||||||
|
- modprobe.start("modprobe", QStringList("uinput"));
|
||||||
|
+ modprobe.start("@kmod@/bin/modprobe", QStringList("uinput"));
|
||||||
|
|
||||||
|
if(!modprobe.waitForFinished())
|
||||||
|
qDebug() << "Modprobe error";
|
|
@ -0,0 +1,45 @@
|
||||||
|
diff --git a/src/daemon/CMakeLists.txt b/src/daemon/CMakeLists.txt
|
||||||
|
index 09056a7..72a7249 100644
|
||||||
|
--- a/src/daemon/CMakeLists.txt
|
||||||
|
+++ b/src/daemon/CMakeLists.txt
|
||||||
|
@@ -249,12 +249,7 @@ elseif (LINUX)
|
||||||
|
# but it is not enabled by default and systemd is used instead. (Ubuntu 15.04+)
|
||||||
|
|
||||||
|
# A way to check for upstart
|
||||||
|
- execute_process(
|
||||||
|
- COMMAND initctl --version
|
||||||
|
- OUTPUT_VARIABLE initctl_output
|
||||||
|
- OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
-
|
||||||
|
- if ("${initctl_output}" MATCHES "upstart")
|
||||||
|
+ if (FALSE)
|
||||||
|
message(STATUS "upstart detected")
|
||||||
|
set(CKB_NEXT_INIT_SYSTEM "upstart" CACHE INTERNAL "")
|
||||||
|
set(DISALLOW_SYSVINIT TRUE)
|
||||||
|
@@ -292,7 +287,7 @@ elseif (LINUX)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# A way to check for systemd
|
||||||
|
- if (EXISTS "/run/systemd/system")
|
||||||
|
+ if (TRUE)
|
||||||
|
message(STATUS "systemd detected")
|
||||||
|
set(CKB_NEXT_INIT_SYSTEM "systemd" CACHE INTERNAL "")
|
||||||
|
set(DISALLOW_SYSVINIT TRUE)
|
||||||
|
@@ -328,7 +323,7 @@ elseif (LINUX)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# A way to check for OpenRC
|
||||||
|
- if (EXISTS "/run/openrc/softlevel")
|
||||||
|
+ if (FALSE)
|
||||||
|
message(STATUS "OpenRC detected")
|
||||||
|
set(CKB_NEXT_INIT_SYSTEM "OpenRC" CACHE INTERNAL "")
|
||||||
|
set(DISALLOW_SYSVINIT TRUE)
|
||||||
|
@@ -419,7 +414,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 "/usr/lib/systemd/system"
|
||||||
|
+ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
|
||||||
|
PERMISSIONS
|
||||||
|
OWNER_READ OWNER_WRITE
|
||||||
|
GROUP_READ
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/src/ckb/animscript.cpp b/src/ckb/animscript.cpp
|
|
||||||
index f49a64c..d7a3459 100644
|
|
||||||
--- a/src/ckb/animscript.cpp
|
|
||||||
+++ b/src/ckb/animscript.cpp
|
|
||||||
@@ -30,7 +30,7 @@ QString AnimScript::path(){
|
|
||||||
#ifdef __APPLE__
|
|
||||||
return QDir(QApplication::applicationDirPath() + "/../Resources").absoluteFilePath("ckb-animations");
|
|
||||||
#else
|
|
||||||
- return QDir("/usr/lib").absoluteFilePath("ckb-animations");
|
|
||||||
+ return QDir(QApplication::applicationDirPath() + "/../libexec").absoluteFilePath("ckb-animations");
|
|
||||||
#endif
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
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
|
|
|
@ -59,6 +59,7 @@ mapAliases ({
|
||||||
cantarell_fonts = cantarell-fonts; # added 2018-03-03
|
cantarell_fonts = cantarell-fonts; # added 2018-03-03
|
||||||
checkbashism = checkbashisms; # added 2016-08-16
|
checkbashism = checkbashisms; # added 2016-08-16
|
||||||
cifs_utils = cifs-utils; # added 2016-08
|
cifs_utils = cifs-utils; # added 2016-08
|
||||||
|
ckb = ckb-next; # added 2018-10-21
|
||||||
clangAnalyzer = clang-analyzer; # added 2015-02-20
|
clangAnalyzer = clang-analyzer; # added 2015-02-20
|
||||||
clawsMail = claws-mail; # added 2016-04-29
|
clawsMail = claws-mail; # added 2016-04-29
|
||||||
clutter_gtk = clutter-gtk; # added 2018-02-25
|
clutter_gtk = clutter-gtk; # added 2018-02-25
|
||||||
|
|
|
@ -2036,7 +2036,7 @@ with pkgs;
|
||||||
|
|
||||||
checkbashisms = callPackage ../development/tools/misc/checkbashisms { };
|
checkbashisms = callPackage ../development/tools/misc/checkbashisms { };
|
||||||
|
|
||||||
ckb = libsForQt5.callPackage ../tools/misc/ckb { };
|
ckb-next = libsForQt5.callPackage ../tools/misc/ckb-next { };
|
||||||
|
|
||||||
clamav = callPackage ../tools/security/clamav { };
|
clamav = callPackage ../tools/security/clamav { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue