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