2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
installShellFiles,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
wheel,
|
|
|
|
docopt,
|
|
|
|
hidapi,
|
|
|
|
pyusb,
|
|
|
|
smbus-cffi,
|
|
|
|
i2c-tools,
|
|
|
|
pytestCheckHook,
|
|
|
|
colorlog,
|
|
|
|
crcmod,
|
|
|
|
pillow,
|
|
|
|
fetchpatch,
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "liquidctl";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.13.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
format = "pyproject";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-10-06 13:57:05 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-LU8rQmXrEIoOBTTFotGvMeHqksYGrtNo2YSl2l2e/UI=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "tests-pillow-10.2.0-compat.patch";
|
|
|
|
url = "https://github.com/liquidctl/liquidctl/commit/c50afa4e610bd2e268e85c347e2644794c817a78.diff";
|
|
|
|
hash = "sha256-1cKk3drl3RybHmnPXdlJoeYK6UDz25jHSS2YS/XLHIY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
setuptools-scm
|
|
|
|
wheel
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
docopt
|
|
|
|
hidapi
|
|
|
|
pyusb
|
|
|
|
smbus-cffi
|
2021-05-20 23:08:51 +00:00
|
|
|
i2c-tools
|
2021-07-14 22:03:04 +00:00
|
|
|
colorlog
|
2022-11-21 17:40:18 +00:00
|
|
|
crcmod
|
|
|
|
pillow
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedNativeBuildInputs = [ smbus-cffi ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage liquidctl.8
|
|
|
|
installShellCompletion extra/completions/liquidctl.bash
|
|
|
|
|
|
|
|
mkdir -p $out/lib/udev/rules.d
|
|
|
|
cp extra/linux/71-liquidctl.rules $out/lib/udev/rules.d/.
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# needed for pythonImportsCheck
|
|
|
|
export XDG_RUNTIME_DIR=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "liquidctl" ];
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices";
|
2021-10-06 13:57:05 +00:00
|
|
|
homepage = "https://github.com/liquidctl/liquidctl";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/liquidctl/liquidctl/blob/v${version}/CHANGELOG.md";
|
2021-10-06 13:57:05 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
arturcygan
|
|
|
|
evils
|
|
|
|
];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "liquidctl";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
}
|