1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build 7 cargo, 8 rustc, 9 rustPlatform, 10}: 11 12buildPythonPackage rec { 13 pname = "betterproto-rust-codec"; 14 version = "0.1.1"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "124C41p"; 19 repo = "betterproto-rust-codec"; 20 tag = "v${version}"; 21 hash = "sha256-Q8oCk/VVe4Dcw6Z5PBFJBKRlsHgi6Jn+FWDqLH8BgYc="; 22 }; 23 24 cargoDeps = rustPlatform.fetchCargoVendor { 25 inherit pname version src; 26 hash = "sha256-zYXE55o1/Tt6XJahV6WcGANPM/9xk6uYwQLazkIJj7A="; 27 }; 28 29 build-system = [ 30 rustPlatform.maturinBuildHook 31 ]; 32 33 nativeBuildInputs = [ 34 cargo 35 rustPlatform.cargoSetupHook 36 rustc 37 ]; 38 39 pythonImportsCheck = [ 40 "betterproto_rust_codec" 41 ]; 42 43 meta = { 44 description = "Converter between betterproto messages and the Protobuf wire format"; 45 homepage = "https://github.com/124C41p/betterproto-rust-codec/releases/tag/${src.tag}"; 46 license = lib.licenses.mit; 47 maintainers = with lib.maintainers; [ sarahec ]; 48 }; 49}