nixpkgs-suyu/pkgs/development/python-modules/liquidctl/default.nix

69 lines
1.4 KiB
Nix
Raw Normal View History

2021-01-02 21:01:34 +01:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, installShellFiles
2021-01-02 21:01:34 +01:00
, docopt
, hidapi
, pyusb
, smbus-cffi
, i2c-tools
, pytestCheckHook
2021-07-06 09:37:39 +02:00
, colorlog
2021-01-02 21:01:34 +01:00
}:
buildPythonPackage rec {
pname = "liquidctl";
2021-10-05 22:01:11 +02:00
version = "1.7.2";
2021-01-02 21:01:34 +01:00
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
2021-10-05 22:01:11 +02:00
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-fPSvxdr329SxAe4N7lTa7hddFp1WVUplkhYD1oDQXAI=";
2021-01-02 21:01:34 +01:00
};
nativeBuildInputs = [ installShellFiles ];
2021-01-02 21:01:34 +01:00
propagatedBuildInputs = [
docopt
hidapi
pyusb
smbus-cffi
i2c-tools
2021-07-06 09:37:39 +02:00
colorlog
2021-01-02 21:01:34 +01:00
];
propagatedNativeBuildInputs = [
smbus-cffi
];
outputs = [ "out" "man" ];
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/.
'';
checkInputs = [ pytestCheckHook ];
postBuild = ''
# needed for pythonImportsCheck
export XDG_RUNTIME_DIR=$TMPDIR
'';
pythonImportsCheck = [ "liquidctl" ];
2021-01-02 21:01:34 +01:00
meta = with lib; {
description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices";
2021-10-05 22:01:11 +02:00
homepage = "https://github.com/liquidctl/liquidctl";
changelog = "https://github.com/liquidctl/liquidctl/blob/master/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ arturcygan evils ];
2021-01-02 21:01:34 +01:00
};
}