1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-05 23:32:35 +03:00
nixpkgs/pkgs/development/python-modules/bitstring/default.nix
Theodore Ni c37f44b755
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.
2022-08-20 01:11:10 -07:00

40 lines
1,008 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, unittestCheckHook
}:
buildPythonPackage rec {
pname = "bitstring";
version = "3.1.9";
src = fetchFromGitHub {
owner = "scott-griffiths";
repo = pname;
rev = "bitstring-${version}";
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" ];
pythonImportsCheck = [ "bitstring" ];
meta = with lib; {
description = "Module for binary data manipulation";
homepage = "https://github.com/scott-griffiths/bitstring";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ bjornfor ];
};
}