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
This commit is contained in:
parent
02a1379d45
commit
e7053a87ad
@ -2,22 +2,30 @@
|
|||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "evcxr";
|
pname = "evcxr";
|
||||||
version = "0.5.3";
|
version = "0.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "google";
|
owner = "google";
|
||||||
repo = "evcxr";
|
repo = "evcxr";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "144xqi19d2nj9qgmhpx6d1kfhx9vfkmk7rnq6nzybpx4mbbl3ki2";
|
sha256 = "sha256-QpUhUE65/IuT/VenziPX6z+CbJswbPPIv/ZnTthZpEU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "07lzxh0wh6azrlzfaacg29zmkn8jdnkdqbwgd5ajy79y8nii3c7z";
|
cargoSha256 = "sha256-iUzVd4XtD+41yTV/BmqWLenzAUNPfS7vIHm1KfuPe9A=";
|
||||||
|
|
||||||
|
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig makeWrapper cmake ];
|
nativeBuildInputs = [ pkgconfig makeWrapper cmake ];
|
||||||
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
||||||
postInstall = ''
|
postInstall = let
|
||||||
wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
|
wrap = exe: ''
|
||||||
wrapProgram $out/bin/evcxr_jupyter --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
|
wrapProgram $out/bin/${exe} \
|
||||||
|
--prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]} \
|
||||||
|
--set-default RUST_SRC_PATH "$RUST_SRC_PATH"
|
||||||
|
'';
|
||||||
|
in ''
|
||||||
|
${wrap "evcxr"}
|
||||||
|
${wrap "evcxr_jupyter"}
|
||||||
rm $out/bin/testing_runtime
|
rm $out/bin/testing_runtime
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user