Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 62 lines 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, installShellFiles 6, docopt 7, hidapi 8, pyusb 9, smbus-cffi 10, i2c-tools 11, pytestCheckHook 12}: 13 14buildPythonPackage rec { 15 pname = "liquidctl"; 16 version = "1.6.1"; 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = pname; 21 repo = pname; 22 rev = "v${version}"; 23 sha256 = "sha256-FYpr1mYzPc0rOE75fUNjxe/57EWl+zcbIbkqFseDhzI="; 24 }; 25 26 nativeBuildInputs = [ installShellFiles ]; 27 28 propagatedBuildInputs = [ 29 docopt 30 hidapi 31 pyusb 32 smbus-cffi 33 i2c-tools 34 ]; 35 36 outputs = [ "out" "man" ]; 37 38 postInstall = '' 39 installManPage liquidctl.8 40 installShellCompletion extra/completions/liquidctl.bash 41 42 mkdir -p $out/lib/udev/rules.d 43 cp extra/linux/71-liquidctl.rules $out/lib/udev/rules.d/. 44 ''; 45 46 checkInputs = [ pytestCheckHook ]; 47 48 postBuild = '' 49 # needed for pythonImportsCheck 50 export XDG_RUNTIME_DIR=$TMPDIR 51 ''; 52 53 pythonImportsCheck = [ "liquidctl" ]; 54 55 meta = with lib; { 56 description = "Cross-platform CLI and Python drivers for AIO liquid coolers and other devices"; 57 homepage = "https://github.com/liquidctl/liquidctl"; 58 changelog = "https://github.com/liquidctl/liquidctl/blob/master/CHANGELOG.md"; 59 license = licenses.gpl3Plus; 60 maintainers = with maintainers; [ arturcygan evils ]; 61 }; 62}