diff --git a/pkgs/development/python-modules/aiomysql/default.nix b/pkgs/development/python-modules/aiomysql/default.nix index 4ebe6774a72d..57ec0b009e41 100644 --- a/pkgs/development/python-modules/aiomysql/default.nix +++ b/pkgs/development/python-modules/aiomysql/default.nix @@ -2,31 +2,41 @@ lib, buildPythonPackage, fetchFromGitHub, - pymysql, + + # build-system setuptools, setuptools-scm, - wheel, + + # dependencies + pymysql, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "aiomysql"; version = "0.3.2"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "aio-libs"; repo = "aiomysql"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-DBNLmroR1W/gsYtW0iGNpki6EYUq6MyHI2pCRdyapU4="; }; - nativeBuildInputs = [ + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail \ + "setuptools_scm[toml] >= 7, < 10" \ + "setuptools_scm[toml]" + ''; + + build-system = [ setuptools setuptools-scm - wheel ]; - propagatedBuildInputs = [ pymysql ]; + dependencies = [ pymysql ]; # Tests require MySQL database doCheck = false; @@ -36,7 +46,8 @@ buildPythonPackage rec { meta = { description = "MySQL driver for asyncio"; homepage = "https://github.com/aio-libs/aiomysql"; + changelog = "https://github.com/aio-libs/aiomysql/blob/${finalAttrs.src.rev}/CHANGES.txt"; license = lib.licenses.mit; maintainers = [ ]; }; -} +})