mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
b6237fb589
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
22 lines
539 B
Nix
22 lines
539 B
Nix
{ lib, buildPythonPackage, fetchPypi, python }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "diff-match-patch";
|
|
version = "20181111";
|
|
|
|
meta = {
|
|
homepage = https://code.google.com/p/google-diff-match-patch/;
|
|
description = "Diff, Match and Patch libraries for Plain Text";
|
|
license = lib.licenses.asl20;
|
|
};
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "a809a996d0f09b9bbd59e9bbd0b71eed8c807922512910e05cbd3f9480712ddb";
|
|
};
|
|
|
|
checkPhase = ''
|
|
${python.interpreter} -m unittest -v diff_match_patch.tests
|
|
'';
|
|
}
|