51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildPythonPackage,
|
|
pythonOlder,
|
|
pytestCheckHook,
|
|
rustPlatform,
|
|
stdenv,
|
|
libiconv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "py-bip39-bindings";
|
|
version = "0.2.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "polkascan";
|
|
repo = "py-bip39-bindings";
|
|
tag = "v${version}";
|
|
hash = "sha256-CglVEvmZ8xYtjFPNhCyzToYrOvGe/Sw3zHAIy1HidzM=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-DsY4IBxuOTUTMiQs93K8G1hG7jI6PnoQ3Rpbd6iyFpU=";
|
|
};
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
enabledTestPaths = [ "tests.py" ];
|
|
|
|
pythonImportsCheck = [ "bip39" ];
|
|
|
|
meta = with lib; {
|
|
description = "Python bindings for the tiny-bip39 library";
|
|
homepage = "https://github.com/polkascan/py-bip39-bindings";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ stargate01 ];
|
|
};
|
|
}
|