2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
|
|
|
rustPlatform,
|
|
|
|
stdenv,
|
|
|
|
py-bip39-bindings,
|
|
|
|
libiconv,
|
|
|
|
}:
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "py-sr25519-bindings";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "unstable-2023-03-15";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "polkascan";
|
|
|
|
repo = "py-sr25519-bindings";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "9127501235bf291d7f14f00ec373d0a5000a32cb";
|
|
|
|
hash = "sha256-mxNmiFvMbV9WQhGNIQXxTkOcJHYs0vyOPM6Nd5367RE=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
hash = "sha256-7fDlEYWOiRVpG3q0n3ZSS1dfNCOh0/4pX/PbcDBvoMI=";
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
pytestCheckHook
|
|
|
|
py-bip39-bindings
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "sr25519" ];
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for sr25519 library";
|
|
|
|
homepage = "https://github.com/polkascan/py-sr25519-bindings";
|
|
|
|
license = licenses.asl20;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
onny
|
|
|
|
stargate01
|
|
|
|
];
|
2022-10-21 18:38:19 +00:00
|
|
|
};
|
|
|
|
}
|