1 { cargo, fetchFromGitHub, makeWrapper, pkg-config, rustPlatform, lib, stdenv
2 , gcc, cmake, libiconv, CoreServices, Security }:
4 rustPlatform.buildRustPackage rec {
8 src = fetchFromGitHub {
12 sha256 = "sha256-TQG0YNwD3WU50fftFv5nGUK9ucxDXYnbQVv8Dewhwm8=";
15 cargoHash = "sha256-F2CduT0/vjoVHua5WshYxsxf4P0QBa+BjFVp7iTsFkU=";
17 RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
19 nativeBuildInputs = [ pkg-config makeWrapper cmake ];
20 buildInputs = lib.optionals stdenv.isDarwin
21 [ libiconv CoreServices Security ];
24 # test broken with rust 1.69:
25 # * https://github.com/evcxr/evcxr/issues/294
26 # * https://github.com/NixOS/nixpkgs/issues/229524
27 "--skip=check_for_errors"
32 wrapProgram $out/bin/${exe} \
33 --prefix PATH : ${lib.makeBinPath [ cargo gcc ]} \
34 --set-default RUST_SRC_PATH "$RUST_SRC_PATH"
38 ${wrap "evcxr_jupyter"}
39 rm $out/bin/testing_runtime
43 description = "An evaluation context for Rust";
44 homepage = "https://github.com/google/evcxr";
45 license = licenses.asl20;
46 maintainers = with maintainers; [ protoben ma27 ];