2023-11-16 04:20:00 +00:00
|
|
|
{ lib, wrapQtAppsHook, fetchFromGitHub, substituteAll, udev, stdenv
|
2024-04-21 15:54:59 +00:00
|
|
|
, pkg-config, qtbase, cmake, zlib, kmod, libXdmcp, qttools, qtx11extras, libdbusmenu, gnused
|
2023-11-16 04:20:00 +00:00
|
|
|
, withPulseaudio ? stdenv.isLinux, libpulseaudio, quazip
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.6.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ckb-next";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ckb-next";
|
|
|
|
repo = "ckb-next";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-G0cvET3wMIi4FlBmaTkdTyYtcdVGzK4X0C2HYZr43eg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
udev
|
|
|
|
qtbase
|
|
|
|
zlib
|
2021-04-25 03:57:28 +00:00
|
|
|
libXdmcp
|
|
|
|
qttools
|
|
|
|
qtx11extras
|
|
|
|
libdbusmenu
|
2023-11-16 04:20:00 +00:00
|
|
|
quazip
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optional withPulseaudio libpulseaudio;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
wrapQtAppsHook
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DINSTALL_DIR_ANIMATIONS=libexec"
|
|
|
|
"-DUDEV_RULE_DIRECTORY=lib/udev/rules.d"
|
|
|
|
"-DFORCE_INIT_SYSTEM=systemd"
|
|
|
|
"-DDISABLE_UPDATER=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./install-dirs.patch
|
|
|
|
(substituteAll {
|
|
|
|
name = "ckb-next-modprobe.patch";
|
|
|
|
src = ./modprobe.patch;
|
|
|
|
inherit kmod;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace "$out/lib/udev/rules.d/99-ckb-next-daemon.rules" \
|
|
|
|
--replace-fail "/usr/bin/env sed" "${lib.getExe gnused}"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Driver and configuration tool for Corsair keyboards and mice";
|
|
|
|
homepage = "https://github.com/ckb-next/ckb-next";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "ckb-next";
|
2022-10-06 18:32:54 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|