diff options
Diffstat (limited to 'pkgs/development/python-modules/zeversolarlocal/default.nix')
-rw-r--r-- | pkgs/development/python-modules/zeversolarlocal/default.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/zeversolarlocal/default.nix b/pkgs/development/python-modules/zeversolarlocal/default.nix index 04063837b42..b1e515d7632 100644 --- a/pkgs/development/python-modules/zeversolarlocal/default.nix +++ b/pkgs/development/python-modules/zeversolarlocal/default.nix @@ -1,7 +1,9 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , flit-core +, dos2unix , httpx , pytest-asyncio , pytest-mock @@ -12,7 +14,7 @@ buildPythonPackage rec { pname = "zeversolarlocal"; version = "1.1.0"; - format = "flit"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -23,6 +25,7 @@ buildPythonPackage rec { nativeBuildInputs = [ flit-core + dos2unix ]; propagatedBuildInputs = [ @@ -35,6 +38,20 @@ buildPythonPackage rec { pytestCheckHook ]; + # the patch below won't apply unless we fix the line endings + prePatch = '' + dos2unix pyproject.toml + ''; + + patches = [ + # Raise the flit-core limit + # https://github.com/sander76/zeversolarlocal/pull/4 + (fetchpatch { + url = "https://github.com/sander76/zeversolarlocal/commit/bff072ea046de07eced77bc79eb8e90dfef1f53f.patch"; + hash = "sha256-tzFCwPzhAfwVfN5mLY/DMwRv7zGzx3ScBe+kKzkYcvo="; + }) + ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace "--cov zeversolarlocal --cov-report xml:cov.xml --cov-report term-missing -vv" "" |