2021-01-05 17:05:55 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, installShellFiles
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, wheel
|
2021-01-05 17:05:55 +00:00
|
|
|
, docopt
|
|
|
|
, hidapi
|
|
|
|
, pyusb
|
|
|
|
, smbus-cffi
|
2021-05-20 23:08:51 +00:00
|
|
|
, i2c-tools
|
|
|
|
, pytestCheckHook
|
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
|
|
|
}:
|
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [
|
|
|
|
smbus-cffi
|
|
|
|
];
|
|
|
|
|
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/.
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-11 07:51:40 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
# needed for pythonImportsCheck
|
|
|
|
export XDG_RUNTIME_DIR=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2023-01-11 07:51:40 +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;
|
2021-05-20 23:08:51 +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
|
|
|
};
|
|
|
|
}
|