Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / py-sr25519-bindings / default.nix
blobc001344a293b103d97ad0094e752f69432db520a
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , buildPythonPackage
5 , pythonOlder
6 , pytestCheckHook
7 , rustPlatform
8 , stdenv
9 , py-bip39-bindings
10 , libiconv }:
12 buildPythonPackage rec {
13   pname = "py-sr25519-bindings";
14   version = "unstable-2023-03-15";
15   format = "pyproject";
17   disabled = pythonOlder "3.6";
19   src = fetchFromGitHub {
20     owner = "polkascan";
21     repo = "py-sr25519-bindings";
22     rev = "9127501235bf291d7f14f00ec373d0a5000a32cb";
23     hash = "sha256-mxNmiFvMbV9WQhGNIQXxTkOcJHYs0vyOPM6Nd5367RE=";
24   };
26   cargoDeps = rustPlatform.fetchCargoTarball {
27     inherit src;
28     name = "${pname}-${version}";
29     hash = "sha256-7fDlEYWOiRVpG3q0n3ZSS1dfNCOh0/4pX/PbcDBvoMI=";
30   };
32   nativeBuildInputs = with rustPlatform; [
33     cargoSetupHook
34     maturinBuildHook
35   ];
37   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
39   nativeCheckInputs = [
40     pytestCheckHook
41     py-bip39-bindings
42   ];
44   pytestFlagsArray = [
45     "tests.py"
46   ];
48   pythonImportsCheck = [
49     "sr25519"
50   ];
52   meta = with lib; {
53     description = "Python bindings for sr25519 library";
54     homepage = "https://github.com/polkascan/py-sr25519-bindings";
55     license = licenses.asl20;
56     maintainers = with maintainers; [ onny stargate01 ];
57   };