10 rustPlatform.buildRustPackage rec {
11 pname = "rust-cbindgen";
14 src = fetchFromGitHub {
18 hash = "sha256-gyNZAuxpeOjuC+Rh9jAyHSBQRRYUlYoIrBKuCFg3Hao=";
21 cargoSha256 = "sha256-pdTxhECAZzBx5C01Yx7y/OGwhhAdlEDpqLBdvQcb8bc=";
23 buildInputs = lib.optional stdenv.isDarwin Security;
27 python3Packages.cython
31 # Disable tests that require rust unstable features
32 # https://github.com/eqrion/cbindgen/issues/338
34 "--skip test_bitfield"
35 "--skip lib_default_uses_debug_build"
36 "--skip lib_explicit_debug_build"
37 "--skip lib_explicit_release_build"
38 ] ++ lib.optionals stdenv.isDarwin [
39 # WORKAROUND: test_body fails when using clang
40 # https://github.com/eqrion/cbindgen/issues/628
45 changelog = "https://github.com/mozilla/cbindgen/blob/v${version}/CHANGES";
46 description = "A project for generating C bindings from Rust code";
47 mainProgram = "cbindgen";
48 homepage = "https://github.com/mozilla/cbindgen";
49 license = licenses.mpl20;
50 maintainers = with maintainers; [ hexa ];