From ee05c8e8b588b53b1f28378124413387e9f7b65d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 22 Jul 2021 23:24:08 +0200 Subject: [PATCH] python3Packages.bitstring: enable tests --- .../python-modules/bitstring/default.nix | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/bitstring/default.nix b/pkgs/development/python-modules/bitstring/default.nix index ab94ad344ff..52bc9bae865 100644 --- a/pkgs/development/python-modules/bitstring/default.nix +++ b/pkgs/development/python-modules/bitstring/default.nix @@ -1,14 +1,27 @@ -{ lib, buildPythonPackage, fetchPypi }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: buildPythonPackage rec { pname = "bitstring"; version = "3.1.9"; - src = fetchPypi { - inherit pname version; - sha256 = "1rv0x3vicjz7df6jq13aypgfqqjvlz0b92ya9li8a5qicczqm155"; + src = fetchFromGitHub { + owner = "scott-griffiths"; + repo = pname; + rev = "bitstring-${version}"; + sha256 = "0y2kcq58psvl038r6dhahhlhp1wjgr5zsms45wyz1naq6ri8x9qa"; }; + checkPhase = '' + cd test + ${python.interpreter} -m unittest discover + ''; + + pythonImportsCheck = [ "bitstring" ]; + meta = with lib; { description = "Module for binary data manipulation"; homepage = "https://github.com/scott-griffiths/bitstring";