From b6237fb589b564a3461c845b2b5c820f5d2d80c2 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 11 Oct 2019 21:48:30 +0200 Subject: [PATCH] python3Packages.diff-match-patch: fix build Rather than using autodiscovery, the checkPhase should import `__init__.py` from `diff_match_patch.tests to execute all relevant tests. Otherwise several python2-related tests are executed in a py3 env and break the build. See also: https://hydra.nixos.org/build/102482273 --- .../development/python-modules/diff-match-patch/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/diff-match-patch/default.nix b/pkgs/development/python-modules/diff-match-patch/default.nix index cf1bebad144..5887575f195 100644 --- a/pkgs/development/python-modules/diff-match-patch/default.nix +++ b/pkgs/development/python-modules/diff-match-patch/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib, buildPythonPackage, fetchPypi, python }: buildPythonPackage rec { pname = "diff-match-patch"; @@ -14,4 +14,8 @@ buildPythonPackage rec { inherit pname version; sha256 = "a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb"; }; + + checkPhase = '' + ${python.interpreter} -m unittest -v diff_match_patch.tests + ''; }