2019-07-21 02:13:17 +02:00
|
|
|
{ cargo, fetchFromGitHub, makeWrapper, pkgconfig, rustPlatform, stdenv, gcc, Security }:
|
2019-04-28 04:08:23 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "evcxr-${version}";
|
|
|
|
version = "0.3.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "evcxr";
|
|
|
|
rev = "ae07ccf08723b7aec0de57d540822b89088ca036";
|
|
|
|
sha256 = "1apc93z9vvf6qks5x2pad45rnrj9kjl812rj78w5zmmizccp2fhf";
|
|
|
|
};
|
|
|
|
|
2019-07-21 01:16:33 +02:00
|
|
|
cargoSha256 = "153pxqj4jhlbacr7607q9yfw6h96ns5igbvssis8j3gn0xp6ssg6";
|
2019-04-28 04:08:23 +02:00
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
|
|
|
|
2019-05-03 19:06:43 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
2019-07-21 02:13:17 +02:00
|
|
|
buildInputs = [ cargo ] ++ stdenv.lib.optional stdenv.isDarwin Security;
|
2019-05-03 19:06:43 +02:00
|
|
|
postInstall = ''
|
2019-07-21 01:16:33 +02:00
|
|
|
wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
|
2019-05-03 19:06:43 +02:00
|
|
|
rm $out/bin/testing_runtime
|
|
|
|
'';
|
2019-04-28 04:08:23 +02:00
|
|
|
|
|
|
|
meta = {
|
2019-05-03 19:06:43 +02:00
|
|
|
description = "An evaluation context for Rust";
|
2019-04-28 04:08:23 +02:00
|
|
|
homepage = "https://github.com/google/evcxr";
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.protoben ];
|
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|