summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/betterproto-rust-codec/default.nix
blob: b29c3d15b234d5fdb9141fe74d467d393a775933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build
  cargo,
  rustc,
  rustPlatform,
}:

buildPythonPackage rec {
  pname = "betterproto-rust-codec";
  version = "0.1.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "124C41p";
    repo = "betterproto-rust-codec";
    tag = "v${version}";
    hash = "sha256-Q8oCk/VVe4Dcw6Z5PBFJBKRlsHgi6Jn+FWDqLH8BgYc=";
  };

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit pname version src;
    hash = "sha256-zYXE55o1/Tt6XJahV6WcGANPM/9xk6uYwQLazkIJj7A=";
  };

  build-system = [
    rustPlatform.maturinBuildHook
  ];

  nativeBuildInputs = [
    cargo
    rustPlatform.cargoSetupHook
    rustc
  ];

  pythonImportsCheck = [
    "betterproto_rust_codec"
  ];

  meta = {
    description = "Converter between betterproto messages and the Protobuf wire format";
    homepage = "https://github.com/124C41p/betterproto-rust-codec/releases/tag/${src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ sarahec ];
  };
}