about summary refs log tree commit diff
path: root/pkgs/development/python-modules/bitstring
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-07-22 23:24:08 +0200
committerFabian Affolter <mail@fabian-affolter.ch>2021-07-22 23:24:08 +0200
commitee05c8e8b588b53b1f28378124413387e9f7b65d (patch)
treefa21c85d0c6e154953d335d80dc8f5214ba01899 /pkgs/development/python-modules/bitstring
parent67402af78cbfeef915b46ce7e3d17a2de01ee2f3 (diff)
python3Packages.bitstring: enable tests
Diffstat (limited to 'pkgs/development/python-modules/bitstring')
-rw-r--r--pkgs/development/python-modules/bitstring/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/bitstring/default.nix b/pkgs/development/python-modules/bitstring/default.nix
index ab94ad344ff98..52bc9bae865bd 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";