lol
at 23.05-pre 77 lines 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, installShellFiles 6, setuptools 7, docopt 8, hidapi 9, pyusb 10, smbus-cffi 11, i2c-tools 12, pytestCheckHook 13, colorlog 14, crcmod 15, pillow 16}: 17 18buildPythonPackage rec { 19 pname = "liquidctl"; 20 version = "1.11.1"; 21 disabled = pythonOlder "3.6"; 22 format = "pyproject"; 23 24 src = fetchFromGitHub { 25 owner = pname; 26 repo = pname; 27 rev = "refs/tags/v${version}"; 28 sha256 = "sha256-9g6h8GMOcICiry9M9b/Tt0ONsTxuJI/duprUkxB1Gr0="; 29 }; 30 31 nativeBuildInputs = [ 32 installShellFiles 33 setuptools 34 ]; 35 36 propagatedBuildInputs = [ 37 docopt 38 hidapi 39 pyusb 40 smbus-cffi 41 i2c-tools 42 colorlog 43 crcmod 44 pillow 45 ]; 46 47 propagatedNativeBuildInputs = [ 48 smbus-cffi 49 ]; 50 51 outputs = [ "out" "man" ]; 52 53 postInstall = '' 54 installManPage liquidctl.8 55 installShellCompletion extra/completions/liquidctl.bash 56 57 mkdir -p $out/lib/udev/rules.d 58 cp extra/linux/71-liquidctl.rules $out/lib/udev/rules.d/. 59 ''; 60 61 checkInputs = [ pytestCheckHook ]; 62 63 postBuild = '' 64 # needed for pythonImportsCheck 65 export XDG_RUNTIME_DIR=$TMPDIR 66 ''; 67 68 pythonImportsCheck = [ "liquidctl" ]; 69 70 meta = with lib; { 71 description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices"; 72 homepage = "https://github.com/liquidctl/liquidctl"; 73 changelog = "https://github.com/liquidctl/liquidctl/blob/master/CHANGELOG.md"; 74 license = licenses.gpl3Plus; 75 maintainers = with maintainers; [ arturcygan evils ]; 76 }; 77}