2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
smbus-cffi,
|
|
|
|
pytestCheckHook,
|
2020-11-09 15:59:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "bme680";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.1.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pimoroni";
|
|
|
|
repo = "bme680-python";
|
|
|
|
rev = "v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-gmdRxMJ0DoCyNcb/bYp746PBi4HktHAAYOcSQJ0Uheg=";
|
2020-11-09 15:59:12 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ smbus-cffi ];
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
cd library
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace library/setup.cfg \
|
|
|
|
--replace "smbus" "smbus-cffi"
|
|
|
|
'';
|
2020-11-09 15:59:12 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "bme680" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library for driving the Pimoroni BME680 Breakout";
|
|
|
|
homepage = "https://github.com/pimoroni/bme680-python";
|
|
|
|
license = licenses.mit;
|
2020-12-03 08:41:04 +00:00
|
|
|
platforms = platforms.linux;
|
2020-11-09 15:59:12 +00:00
|
|
|
maintainers = with maintainers; [ mic92 ];
|
|
|
|
};
|
|
|
|
}
|