Merge pull request #147066 from smancill/python3-pyahocorasick-upstream-patch

This commit is contained in:
Sandro
2021-11-30 19:48:59 +01:00
committed by GitHub
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
}:
@@ -15,10 +16,13 @@ buildPythonPackage rec {
sha256 = "13x3718if28l50474xrz1b9709kvnvdg3nzm6y8bh7mc9a4zyss5";
};
postPatch = ''
substituteInPlace unittests.py \
--replace '(tmp, "test.dat")' "(\"$TMPDIR\", \"test.dat\")"
'';
patches = [
# Use proper temporary directory on Hydra
(fetchpatch {
url = "https://github.com/WojciechMula/pyahocorasick/commit/b6549e06f3cced7ffdf4d1b587cd7de12041f495.patch";
sha256 = "sha256-v3J/0aIPOnBhLlJ18r/l7O0MckqLOCtcmqIS9ZegaSI=";
})
];
checkInputs = [ pytestCheckHook ];