From 46c3452a16a030c20cf2f842ee3820cf6bebd0a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mancilla?= Date: Sun, 21 Nov 2021 01:05:37 -0300 Subject: [PATCH] python3Packages.pyahocorasick: fix build on Hydra (x86_64-darwin) Tests need write access to /tmp, which fails on Hydra (x86_64-darwin). Use $TMPDIR instead. --- pkgs/development/python-modules/pyahocorasick/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/pyahocorasick/default.nix b/pkgs/development/python-modules/pyahocorasick/default.nix index 87d1d0c9fc01..7bb2f7c988a9 100644 --- a/pkgs/development/python-modules/pyahocorasick/default.nix +++ b/pkgs/development/python-modules/pyahocorasick/default.nix @@ -15,6 +15,11 @@ buildPythonPackage rec { sha256 = "13x3718if28l50474xrz1b9709kvnvdg3nzm6y8bh7mc9a4zyss5"; }; + postPatch = '' + substituteInPlace unittests.py \ + --replace '(tmp, "test.dat")' "(\"$TMPDIR\", \"test.dat\")" + ''; + checkInputs = [ pytestCheckHook ]; pytestFlagsArray = [ "unittests.py" ];