about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2021-02-03 12:46:49 +0100
committerPavol Rusnak <pavol@rusnak.io>2021-02-03 13:02:31 +0100
commitc72b72a7c1105fd08c246d393e18f25f6ea24103 (patch)
treeca4ab30c6236d224119b45e85ad900bf18deed20
parentfab6fcdceb2560a4ab943830a2b1632458c7a6ff (diff)
python3Packages.mnemonic: enable tests by fetching sources from github
-rw-r--r--pkgs/development/python-modules/mnemonic/default.nix26
1 files changed, 17 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/mnemonic/default.nix b/pkgs/development/python-modules/mnemonic/default.nix
index 2811d0ecda549..8d47db6369646 100644
--- a/pkgs/development/python-modules/mnemonic/default.nix
+++ b/pkgs/development/python-modules/mnemonic/default.nix
@@ -1,20 +1,28 @@
-{ lib, fetchPypi, buildPythonPackage, pbkdf2 }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
   pname = "mnemonic";
   version = "0.19";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "4e37eb02b2cbd56a0079cabe58a6da93e60e3e4d6e757a586d9f23d96abea931";
+  src = fetchFromGitHub {
+    owner = "trezor";
+    repo = "python-${pname}";
+    rev = "v${version}";
+    sha256 = "0rs3szdikkgypiwn43ad3lwh7zvpccw39j5ggkziq6v7pnw3isaq";
   };
 
-  propagatedBuildInputs = [ pbkdf2 ];
+  checkInputs = [ pytestCheckHook ];
 
-  meta = {
-    description = "Implementation of Bitcoin BIP-0039";
+  pythonImportsCheck = [ "mnemonic" ];
+
+  meta = with lib; {
+    description = "Reference implementation of BIP-0039";
     homepage = "https://github.com/trezor/python-mnemonic";
-    license = lib.licenses.mit;
-    maintainers = with lib.maintainers; [ np ];
+    license = licenses.mit;
+    maintainers = with maintainers; [ np prusnak ];
   };
 }