diff --git a/pkgs/development/python-modules/fluent-logger/default.nix b/pkgs/development/python-modules/fluent-logger/default.nix index 2afef24b9b1c..8d9610d2d448 100644 --- a/pkgs/development/python-modules/fluent-logger/default.nix +++ b/pkgs/development/python-modules/fluent-logger/default.nix @@ -1,24 +1,41 @@ -{ lib, buildPythonPackage, fetchPypi, msgpack }: +{ lib +, buildPythonPackage +, fetchFromGitHub + +# build-system +, hatchling + +# dependencies +, msgpack + +# tests +, pytestCheckHook, +}: buildPythonPackage rec { pname = "fluent-logger"; - version = "0.10.0"; - format = "setuptools"; + version = "0.11.0"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "678bda90c513ff0393964b64544ce41ef25669d2089ce6c3b63d9a18554b9bfa"; + src = fetchFromGitHub { + owner = "fluent"; + repo = "fluent-logger-python"; + rev = "refs/tags/v${version}"; + hash = "sha256-PfyjJZT5K/IMsyyWNZdh/CZf+uZHeJGfhyAPuu0IhJk="; }; - prePatch = '' - substituteInPlace setup.py \ - --replace "msgpack<1.0.0" "msgpack" - ''; + build-system = [ + hatchling + ]; - propagatedBuildInputs = [ msgpack ]; + dependencies = [ + msgpack + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; - # Tests fail because absent in package - doCheck = false; pythonImportsCheck = [ "fluent" "fluent.event"