15 buildPythonPackage rec {
16 pname = "w1thermsensor";
20 disabled = pythonOlder "3.7";
23 inherit pname version;
24 hash = "sha256-n7wK4N1mzZtUxtYu17qyuI4UjJh/59UGD0dvkOgcInA=";
28 sed -i 's/3\.5\.\*/3.5/' setup.py
31 nativeBuildInputs = [ setuptools ];
33 propagatedBuildInputs = [ click ];
35 optional-dependencies = {
39 # Don't try to load the kernel module in tests.
40 env.W1THERMSENSOR_NO_KERNEL_MODULE = 1;
48 ++ lib.optionals (pythonOlder "3.11") [ tomli ]
49 ++ lib.flatten (builtins.attrValues optional-dependencies);
51 pythonImportsCheck = [ "w1thermsensor" ];
54 description = "Python interface to 1-Wire temperature sensors";
55 mainProgram = "w1thermsensor";
57 A Python package and CLI tool to work with w1 temperature sensors like
58 DS1822, DS18S20 & DS18B20 on the Raspberry Pi, Beagle Bone and other
61 homepage = "https://github.com/timofurrer/w1thermsensor";
62 changelog = "https://github.com/timofurrer/w1thermsensor/blob/v${version}/CHANGELOG.rst";
63 license = licenses.mit;
64 maintainers = with maintainers; [ quentin ];
65 platforms = platforms.all;