nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 pytestCheckHook,
6 rustPlatform,
7 stdenv,
8 py-bip39-bindings,
9 libiconv,
10}:
11
12buildPythonPackage rec {
13 pname = "py-sr25519-bindings";
14 version = "0.2.3";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "JAMdotTech";
19 repo = "py-sr25519";
20 tag = "v${version}";
21 hash = "sha256-lia0hA3EayeJN4hf1dE5ezuitknIIQirnWwVjGtdMoo=";
22 };
23
24 cargoDeps = rustPlatform.fetchCargoVendor {
25 inherit pname version src;
26 hash = "sha256-+6uutjGp+JzJ4cFZYdWUBLSKXvt6doW1oZkhnMhW9J0=";
27 };
28
29 nativeBuildInputs = with rustPlatform; [
30 cargoSetupHook
31 maturinBuildHook
32 ];
33
34 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 py-bip39-bindings
39 ];
40
41 enabledTestPaths = [ "tests.py" ];
42
43 pythonImportsCheck = [ "sr25519" ];
44
45 meta = {
46 description = "Python bindings for sr25519 library";
47 homepage = "https://github.com/JAMdotTech/py-sr25519";
48 changelog = "https://github.com/JAMdotTech/py-sr25519/releases/tag/${src.tag}";
49 license = lib.licenses.asl20;
50 maintainers = with lib.maintainers; [
51 onny
52 stargate01
53 ];
54 };
55}