1{
2 lib,
3 stdenv,
4 fetchCrate,
5 rustPlatform,
6 libz,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "cargo-bazel";
11 version = "0.8.0";
12
13 src = fetchCrate {
14 inherit pname version;
15 hash = "sha256-FS1WFlK0YNq1QCi3S3f5tMN+Bdcfx2dxhDKRLXLcios=";
16 };
17
18 buildInputs = lib.optional stdenv.hostPlatform.isDarwin libz;
19
20 cargoHash = "sha256-E/yF42Vx9tv8Ik1j23El3+fI19ZGzq6nikVMATY7m3E=";
21
22 # `test_data` is explicitly excluded from the package published to crates.io, so tests cannot be run
23 doCheck = false;
24
25 meta = with lib; {
26 description = "Part of the `crate_universe` collection of tools which use Cargo to generate build targets for Bazel";
27 mainProgram = "cargo-bazel";
28 homepage = "https://github.com/bazelbuild/rules_rust";
29 license = licenses.asl20;
30 maintainers = with maintainers; [ rickvanprim ];
31 };
32}