1 { cxx-rs, fetchFromGitHub, lib, rustPlatform, testers }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-h6TmQyxhoOhaAWBZr9rRPCf0BE2QMBIYm5uTVKD2paE=";
15 lockFile = ./Cargo.lock;
19 cp ${./Cargo.lock} Cargo.lock
31 cargoTestFlags = [ "--workspace" ];
33 outputs = [ "out" "doc" "dev" ];
37 cp -r ./target/doc/* $doc
39 mkdir -p $dev/include/rust
40 install -D -m 0644 ./include/cxx.h $dev/include/rust
43 passthru.tests.version = testers.testVersion {
45 command = "cxxbridge --version";
49 description = "Safe FFI between Rust and C++";
50 mainProgram = "cxxbridge";
51 homepage = "https://github.com/dtolnay/cxx";
52 license = licenses.mit;
53 maintainers = with maintainers; [ centromere ];