2019-09-16 20:46:26 +00:00
|
|
|
{ cargo, fetchFromGitHub, makeWrapper, pkgconfig, rustPlatform, stdenv, gcc, Security, cmake }:
|
2019-04-28 02:08:23 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-24 19:16:41 +00:00
|
|
|
pname = "evcxr";
|
2020-07-26 00:43:55 +00:00
|
|
|
version = "0.5.2";
|
2019-04-28 02:08:23 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "evcxr";
|
2020-07-26 00:43:55 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "09xziv2vmjd30yy095l3n33v9vdkbbkyjdcc5azyd76m2fk9vi42";
|
2019-04-28 02:08:23 +00:00
|
|
|
};
|
|
|
|
|
2020-07-26 00:43:55 +00:00
|
|
|
cargoSha256 = "1cdj5qh3z4bnz2267s83chw6n1kg9zl1hrawkis5rr9vq7llrb24";
|
2019-04-28 02:08:23 +00:00
|
|
|
|
2019-09-16 20:46:26 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper cmake ];
|
|
|
|
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
|
2019-05-03 17:06:43 +00:00
|
|
|
postInstall = ''
|
2019-07-20 23:16:33 +00:00
|
|
|
wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
|
2020-06-30 21:26:49 +00:00
|
|
|
wrapProgram $out/bin/evcxr_jupyter --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
|
2019-05-03 17:06:43 +00:00
|
|
|
rm $out/bin/testing_runtime
|
|
|
|
'';
|
2019-04-28 02:08:23 +00:00
|
|
|
|
2019-09-16 20:46:26 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-05-03 17:06:43 +00:00
|
|
|
description = "An evaluation context for Rust";
|
2019-04-28 02:08:23 +00:00
|
|
|
homepage = "https://github.com/google/evcxr";
|
2019-09-16 20:46:26 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ protoben ma27 ];
|
|
|
|
platforms = platforms.all;
|
2019-04-28 02:08:23 +00:00
|
|
|
};
|
|
|
|
}
|