Skip to content

Commit e7053a8

Browse files
committed
evcxr: 0.5.3 -> 0.6.0
Since version `0.6.0` the `rust-src` component (or declaring `RUST_SRC_PATH`) is needed. Just like in `rust-analyzer`, this is solved by setting `RUST_SRC_PATH` to `rustPlatform.rustLibSrc` for tests and wrapped executables. ChangeLog: https://github.com/google/evcxr/blob/v0.6.0/RELEASE_NOTES.md#version-060
1 parent 02a1379 commit e7053a8

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

pkgs/development/interpreters/evcxr/default.nix

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,30 @@
22

33
rustPlatform.buildRustPackage rec {
44
pname = "evcxr";
5-
version = "0.5.3";
5+
version = "0.6.0";
66

77
src = fetchFromGitHub {
88
owner = "google";
99
repo = "evcxr";
1010
rev = "v${version}";
11-
sha256 = "144xqi19d2nj9qgmhpx6d1kfhx9vfkmk7rnq6nzybpx4mbbl3ki2";
11+
sha256 = "sha256-QpUhUE65/IuT/VenziPX6z+CbJswbPPIv/ZnTthZpEU=";
1212
};
1313

14-
cargoSha256 = "07lzxh0wh6azrlzfaacg29zmkn8jdnkdqbwgd5ajy79y8nii3c7z";
14+
cargoSha256 = "sha256-iUzVd4XtD+41yTV/BmqWLenzAUNPfS7vIHm1KfuPe9A=";
15+
16+
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
1517

1618
nativeBuildInputs = [ pkgconfig makeWrapper cmake ];
1719
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
18-
postInstall = ''
19-
wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
20-
wrapProgram $out/bin/evcxr_jupyter --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
20+
postInstall = let
21+
wrap = exe: ''
22+
wrapProgram $out/bin/${exe} \
23+
--prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]} \
24+
--set-default RUST_SRC_PATH "$RUST_SRC_PATH"
25+
'';
26+
in ''
27+
${wrap "evcxr"}
28+
${wrap "evcxr_jupyter"}
2129
rm $out/bin/testing_runtime
2230
'';
2331

0 commit comments

Comments
 (0)