Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 86 lines 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 installShellFiles, 6 setuptools, 7 setuptools-scm, 8 wheel, 9 docopt, 10 hidapi, 11 pyusb, 12 smbus-cffi, 13 i2c-tools, 14 pytestCheckHook, 15 colorlog, 16 crcmod, 17 pillow, 18 udevCheckHook, 19}: 20 21buildPythonPackage rec { 22 pname = "liquidctl"; 23 version = "1.15.0"; 24 pyproject = true; 25 26 src = fetchFromGitHub { 27 owner = "liquidctl"; 28 repo = "liquidctl"; 29 tag = "v${version}"; 30 hash = "sha256-ifYPUAF0lR9aCwiseNQZXbq+d+CXD/MwnZQhAM1TRLI="; 31 }; 32 33 nativeBuildInputs = [ 34 installShellFiles 35 setuptools 36 setuptools-scm 37 wheel 38 udevCheckHook 39 ]; 40 41 propagatedBuildInputs = [ 42 docopt 43 hidapi 44 pyusb 45 smbus-cffi 46 i2c-tools 47 colorlog 48 crcmod 49 pillow 50 ]; 51 52 propagatedNativeBuildInputs = [ smbus-cffi ]; 53 54 outputs = [ 55 "out" 56 "man" 57 ]; 58 59 postInstall = '' 60 installManPage liquidctl.8 61 installShellCompletion extra/completions/liquidctl.bash 62 63 mkdir -p $out/lib/udev/rules.d 64 cp extra/linux/71-liquidctl.rules $out/lib/udev/rules.d/. 65 ''; 66 67 nativeCheckInputs = [ pytestCheckHook ]; 68 69 postBuild = '' 70 # needed for pythonImportsCheck 71 export XDG_RUNTIME_DIR=$TMPDIR 72 ''; 73 74 pythonImportsCheck = [ "liquidctl" ]; 75 76 meta = { 77 description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices"; 78 homepage = "https://github.com/liquidctl/liquidctl"; 79 changelog = "https://github.com/liquidctl/liquidctl/blob/${src.tag}/CHANGELOG.md"; 80 license = lib.licenses.gpl3Plus; 81 maintainers = with lib.maintainers; [ 82 arturcygan 83 ]; 84 mainProgram = "liquidctl"; 85 }; 86}