Skip to content

Commit 8c22d0f

Browse files
committed
evcxr: 0.17.0 -> 0.19.0
1 parent cd6c09e commit 8c22d0f

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

pkgs/by-name/ev/evcxr/package.nix

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,25 @@
77
lib,
88
stdenv,
99
gcc,
10+
mold,
11+
rustc,
1012
cmake,
1113
libiconv,
1214
}:
1315

1416
rustPlatform.buildRustPackage rec {
1517
pname = "evcxr";
16-
version = "0.17.0";
18+
version = "0.19.0";
1719

1820
src = fetchFromGitHub {
1921
owner = "google";
2022
repo = "evcxr";
2123
rev = "v${version}";
22-
sha256 = "sha256-6gSJJ3ptqpYydjg+xf5Pz3iTk0D+bkC6N79OeiKxPHY=";
24+
sha256 = "sha256-8PjZFWUH76QrA8EI9Cx0sBCzocvSmnp84VD7Nv9QMc8=";
2325
};
2426

2527
useFetchCargoVendor = true;
26-
cargoHash = "sha256-U2LBesQNOa/E/NkVeLulb8JUtGsHgMne0MgY0RT9lqI=";
28+
cargoHash = "sha256-hE/O6lHC0o+nrN4vaQ155Nn2gZscpfsZ6o7IDi/IEjI=";
2729

2830
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
2931

@@ -37,12 +39,28 @@ rustPlatform.buildRustPackage rec {
3739
];
3840

3941
checkFlags = [
40-
# test broken with rust 1.69:
41-
# * https://github.com/evcxr/evcxr/issues/294
42-
# * https://github.com/NixOS/nixpkgs/issues/229524
43-
"--skip=check_for_errors"
42+
# outdated rust-analyzer (disabled, upstream)
43+
# https://github.com/evcxr/evcxr/blob/fcdac75f49dcab3229524e671d4417d36c12130b/evcxr/tests/integration_tests.rs#L741
44+
# https://github.com/evcxr/evcxr/issues/295
45+
"--skip=partially_inferred_variable_type"
46+
# fail, but can't reproduce in the REPL
47+
"--skip=code_completion"
48+
"--skip=save_and_restore_variables"
4449
];
4550

51+
# Some tests fail when types aren't explicitly specified, but which can't be
52+
# reproduced inside the REPL.
53+
# Likely related to https://github.com/evcxr/evcxr/issues/295
54+
postConfigure = ''
55+
substituteInPlace evcxr/tests/integration_tests.rs \
56+
--replace-fail "let var2 = String" "let var2: String = String" `# code_completion` \
57+
--replace-fail "let a = vec" "let a: Vec<i32> = vec" `# function_panics_{with,without}_variable_preserving` \
58+
--replace-fail "let a = Some(" "let a: Option<String> = Some(" `# moved_value` \
59+
--replace-fail "let a = \"foo\"" "let a: String = \"foo\"" `# statement_and_expression` \
60+
--replace-fail "let owned = \"owned\"" "let owned:String = \"owned\"" `# question_mark_operator` \
61+
--replace-fail "let mut owned_mut =" "let mut owned_mut: String ="
62+
'';
63+
4664
postInstall =
4765
let
4866
wrap = exe: ''
@@ -51,6 +69,8 @@ rustPlatform.buildRustPackage rec {
5169
lib.makeBinPath [
5270
cargo
5371
gcc
72+
mold # fix fatal error: "unknown command line option: -run"
73+
rustc # requires rust edition 2024
5474
]
5575
} \
5676
--set-default RUST_SRC_PATH "$RUST_SRC_PATH"

0 commit comments

Comments
 (0)