Merge pull request #111741 from prusnak/shamir-mnemonic

python3Packages.shamir-mnemonic: 0.1.0 -> 0.2.0
This commit is contained in:
Pavol Rusnak 2021-02-03 15:44:36 +01:00 committed by GitHub
commit 9f3ac9fb5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 16 deletions

View file

@ -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 ];
};
}

View file

@ -1,22 +1,40 @@
{ lib, fetchPypi, buildPythonPackage, isPy3k, click, colorama }:
{ lib
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, attrs
, click
, colorama
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "shamir-mnemonic";
version = "0.1.0";
version = "0.2.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "1cc08d276e05b13cd32bd3b0c5d1cb6c30254e0086e0f6857ec106d4cceff121";
src = fetchFromGitHub {
owner = "trezor";
repo = "python-${pname}";
rev = "v${version}";
sha256 = "0lkkbl50n8g5z44x7rk1ly6ld0vlassahwagm8b15bvxfi0q9yqb";
};
propagatedBuildInputs = [ click colorama ];
propagatedBuildInputs = [
attrs
click
colorama
];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "shamir_mnemonic" ];
meta = with lib; {
description = "Reference implementation of SLIP-0039";
homepage = "https://github.com/trezor/python-shamir-mnemonic";
license = licenses.mit;
maintainers = with maintainers; [ _1000101 ];
maintainers = with maintainers; [ _1000101 prusnak ];
};
}