lol
at 25.11-pre 78 lines 1.5 kB view raw
1{ 2 lib, 3 wrapQtAppsHook, 4 fetchFromGitHub, 5 replaceVars, 6 udev, 7 stdenv, 8 pkg-config, 9 qtbase, 10 cmake, 11 zlib, 12 kmod, 13 libXdmcp, 14 qttools, 15 qtx11extras, 16 libdbusmenu, 17 gnused, 18 withPulseaudio ? stdenv.hostPlatform.isLinux, 19 libpulseaudio, 20 quazip, 21}: 22 23stdenv.mkDerivation rec { 24 version = "0.6.2"; 25 pname = "ckb-next"; 26 27 src = fetchFromGitHub { 28 owner = "ckb-next"; 29 repo = "ckb-next"; 30 rev = "v${version}"; 31 hash = "sha256-lA1FpUee2SpUQwJotbYhG0QX7LT5l2PP9lJ9F3uNtdU="; 32 }; 33 34 buildInputs = [ 35 udev 36 qtbase 37 zlib 38 libXdmcp 39 qttools 40 qtx11extras 41 libdbusmenu 42 quazip 43 ] ++ lib.optional withPulseaudio libpulseaudio; 44 45 nativeBuildInputs = [ 46 wrapQtAppsHook 47 pkg-config 48 cmake 49 ]; 50 51 cmakeFlags = [ 52 "-DINSTALL_DIR_ANIMATIONS=libexec" 53 "-DUDEV_RULE_DIRECTORY=lib/udev/rules.d" 54 "-DFORCE_INIT_SYSTEM=systemd" 55 "-DDISABLE_UPDATER=1" 56 ]; 57 58 patches = [ 59 ./install-dirs.patch 60 (replaceVars ./modprobe.patch { 61 inherit kmod; 62 }) 63 ]; 64 65 postInstall = '' 66 substituteInPlace "$out/lib/udev/rules.d/99-ckb-next-daemon.rules" \ 67 --replace-fail "/usr/bin/env sed" "${lib.getExe gnused}" 68 ''; 69 70 meta = with lib; { 71 description = "Driver and configuration tool for Corsair keyboards and mice"; 72 homepage = "https://github.com/ckb-next/ckb-next"; 73 license = licenses.gpl2Only; 74 platforms = platforms.linux; 75 mainProgram = "ckb-next"; 76 maintainers = [ ]; 77 }; 78}