python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / python-modules / py-bip39-bindings / default.nix
blob8385f492d8f3612a09e204ff4a7d040c3237b6c8
1 { lib
2 , fetchFromGitHub
3 , fetchpatch
4 , buildPythonPackage
5 , pythonOlder
6 , pytestCheckHook
7 , rustPlatform
8 , stdenv
9 , libiconv }:
11 buildPythonPackage rec {
12   pname = "py-bip39-bindings";
13   version = "0.1.10";
14   format = "pyproject";
16   disabled = pythonOlder "3.6";
18   src = fetchFromGitHub {
19     owner = "polkascan";
20     repo = "py-bip39-bindings";
21     rev = "ddb74433c2dca7b1f1e1984c33b9da7b51a30227";
22     sha256 = "sha256-MBDic955EohTW6BWprv7X+ZPHoqzkyBJYKV4jpNPKz8=";
23   };
25   cargoDeps = rustPlatform.importCargoLock {
26     lockFile = ./Cargo.lock;
27   };
29   postPatch = ''
30     cp ${./Cargo.lock} Cargo.lock
31   '';
33   nativeBuildInputs = with rustPlatform; [
34     cargoSetupHook
35     maturinBuildHook
36   ];
38   buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
40   checkInputs = [
41     pytestCheckHook
42   ];
44   pytestFlagsArray = [
45     "tests.py"
46   ];
48   pythonImportsCheck = [
49     "bip39"
50   ];
52   meta = with lib; {
53     description = "Python bindings for the tiny-bip39 library";
54     homepage = "https://github.com/polkascan/py-bip39-bindings";
55     license = licenses.asl20;
56     maintainers = with maintainers; [ stargate01 ];
57   };