From 75f7bef2a0230664d09e09e5c45633c506998c36 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 19 Jun 2024 05:04:56 +0200 Subject: [PATCH] python3Packages.bme680: 1.1.1 -> 2.0.0 --- .../python-modules/bme680/default.nix | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/bme680/default.nix b/pkgs/development/python-modules/bme680/default.nix index bed4b74b0344..3d1a3c0cd233 100644 --- a/pkgs/development/python-modules/bme680/default.nix +++ b/pkgs/development/python-modules/bme680/default.nix @@ -2,39 +2,43 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system + hatchling, + hatch-fancy-pypi-readme, + + # dependencies + smbus2, + + # checks mock, - smbus-cffi, pytestCheckHook, }: buildPythonPackage rec { pname = "bme680"; - version = "1.1.1"; - format = "setuptools"; + version = "2.0.0"; + pyproject = true; src = fetchFromGitHub { owner = "pimoroni"; repo = "bme680-python"; - rev = "v${version}"; - hash = "sha256-gmdRxMJ0DoCyNcb/bYp746PBi4HktHAAYOcSQJ0Uheg="; + rev = "refs/tags/v${version}"; + hash = "sha256-ep0dnok/ycEoUAnOK4QmdqdO0r4ttzSoqHDl7aPengE="; }; - propagatedBuildInputs = [ smbus-cffi ]; + build-system = [ + hatchling + hatch-fancy-pypi-readme + ]; - preBuild = '' - cd library - ''; + dependencies = [ smbus2 ]; nativeCheckInputs = [ mock pytestCheckHook ]; - postPatch = '' - substituteInPlace library/setup.cfg \ - --replace "smbus" "smbus-cffi" - ''; - pythonImportsCheck = [ "bme680" ]; meta = with lib; {