diff options
Diffstat (limited to 'pkgs/development/python-modules/pylacrosse/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pylacrosse/default.nix | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/pkgs/development/python-modules/pylacrosse/default.nix b/pkgs/development/python-modules/pylacrosse/default.nix index f173d8569646..0bd6c7f0b977 100644 --- a/pkgs/development/python-modules/pylacrosse/default.nix +++ b/pkgs/development/python-modules/pylacrosse/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, mock -, pynose -, pyserial -, pytestCheckHook -, pythonOlder +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch2, + mock, + pyserial, + pytestCheckHook, + pythonOlder, }: buildPythonPackage rec { @@ -22,24 +23,27 @@ buildPythonPackage rec { hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw="; }; + patches = [ + # Migrate to pytest, https://github.com/hthiery/python-lacrosse/pull/17 + (fetchpatch2 { + url = "https://github.com/hthiery/python-lacrosse/commit/cc2623c667bc252360a9b5ccb4fc05296cf23d9c.patch?full_index=1"; + hash = "sha256-LKryLnXMKj1lVClneyHNVOWM5KPPhOGy0/FX/7Qy/jU="; + }) + ]; + postPatch = '' substituteInPlace setup.py \ --replace "version = version," "version = '${version}'," ''; - propagatedBuildInputs = [ - pyserial - ]; + propagatedBuildInputs = [ pyserial ]; nativeCheckInputs = [ mock - pynose pytestCheckHook ]; - pythonImportsCheck = [ - "pylacrosse" - ]; + pythonImportsCheck = [ "pylacrosse" ]; meta = with lib; { description = "Python library for Jeelink LaCrosse"; |