From c37f44b755d9464f53eae4f319206659d8624318 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 19 Aug 2022 16:10:07 -0700 Subject: [PATCH] python310Packages.bitstring: fix unit tests The unit tests are broken on staging by the new unittest hook, because this project did not run its tests using `unittest` from project root. For now, I've submitted a patch upstream and pulled it in here so that the build is unblocked. --- pkgs/development/python-modules/bitstring/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/bitstring/default.nix b/pkgs/development/python-modules/bitstring/default.nix index 2b3fdef896b2e..c67b70778c89d 100644 --- a/pkgs/development/python-modules/bitstring/default.nix +++ b/pkgs/development/python-modules/bitstring/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub +, fetchpatch , unittestCheckHook }: @@ -15,6 +16,14 @@ buildPythonPackage rec { sha256 = "0y2kcq58psvl038r6dhahhlhp1wjgr5zsms45wyz1naq6ri8x9qa"; }; + patches = [ + (fetchpatch { + name = "fix-running-unit-tests-using-unittest-hook.patch"; + url = "https://github.com/scott-griffiths/bitstring/commit/e5ee3fd41cad2ea761f4450b13b0424ae7262331.patch"; + hash = "sha256-+ZGywIfQQcYXJlYZBi402ONnysYm66G5zE4duJE40h8="; + }) + ]; + checkInputs = [ unittestCheckHook ]; unittestFlagsArray = [ "-s" "test" ];