1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 hatchling,
8 hatch-fancy-pypi-readme,
9
10 # dependencies
11 smbus2,
12
13 # checks
14 mock,
15 pytestCheckHook,
16}:
17
18buildPythonPackage rec {
19 pname = "bme680";
20 version = "2.0.0";
21 pyproject = true;
22
23 src = fetchFromGitHub {
24 owner = "pimoroni";
25 repo = "bme680-python";
26 tag = "v${version}";
27 hash = "sha256-ep0dnok/ycEoUAnOK4QmdqdO0r4ttzSoqHDl7aPengE=";
28 };
29
30 build-system = [
31 hatchling
32 hatch-fancy-pypi-readme
33 ];
34
35 dependencies = [ smbus2 ];
36
37 nativeCheckInputs = [
38 mock
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [ "bme680" ];
43
44 meta = with lib; {
45 description = "Python library for driving the Pimoroni BME680 Breakout";
46 homepage = "https://github.com/pimoroni/bme680-python";
47 license = licenses.mit;
48 platforms = platforms.linux;
49 maintainers = with maintainers; [ mic92 ];
50 };
51}