depot/pkgs/tools/misc/ckb-next/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

63 lines
1.5 KiB
Nix

{ lib, wrapQtAppsHook, fetchFromGitHub, substituteAll, udev, stdenv
, pkg-config, qtbase, cmake, zlib, kmod, libXdmcp, qttools, qtx11extras, libdbusmenu, gnused
, withPulseaudio ? stdenv.hostPlatform.isLinux, libpulseaudio, quazip
}:
stdenv.mkDerivation rec {
version = "0.6.0";
pname = "ckb-next";
src = fetchFromGitHub {
owner = "ckb-next";
repo = "ckb-next";
rev = "v${version}";
hash = "sha256-G0cvET3wMIi4FlBmaTkdTyYtcdVGzK4X0C2HYZr43eg=";
};
buildInputs = [
udev
qtbase
zlib
libXdmcp
qttools
qtx11extras
libdbusmenu
quazip
] ++ lib.optional withPulseaudio libpulseaudio;
nativeBuildInputs = [
wrapQtAppsHook
pkg-config
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;
})
];
postInstall = ''
substituteInPlace "$out/lib/udev/rules.d/99-ckb-next-daemon.rules" \
--replace-fail "/usr/bin/env sed" "${lib.getExe gnused}"
'';
meta = with lib; {
description = "Driver and configuration tool for Corsair keyboards and mice";
homepage = "https://github.com/ckb-next/ckb-next";
license = licenses.gpl2Only;
platforms = platforms.linux;
mainProgram = "ckb-next";
maintainers = [ ];
};
}