From 5b2e2ba60c0b877f87bea336aeaa93aa482c9545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Mon, 22 Nov 2021 20:42:59 -0300 Subject: [PATCH] python3Packages.pyahocorasick: use upstream patch Follow up to 46c3452a16a (python3Packages.pyahocorasick: fix build on Hydra (x86_64-darwin), 2021-11-21), now with upstream patch. --- .../python-modules/pyahocorasick/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyahocorasick/default.nix b/pkgs/development/python-modules/pyahocorasick/default.nix index 7bb2f7c988a9..56e5636622b8 100644 --- a/pkgs/development/python-modules/pyahocorasick/default.nix +++ b/pkgs/development/python-modules/pyahocorasick/default.nix @@ -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 ];