about summary refs log tree commit diff
path: root/pkgs/development/interpreters/evcxr/default.nix
blob: 84ebc49a2218597c0f8bea53c73fc28ccbd07876 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ cargo, fetchFromGitHub, makeWrapper, pkgconfig, rustPlatform, stdenv, gcc, Security, zeromq }:

rustPlatform.buildRustPackage rec {
  pname = "evcxr";
  version = "0.4.3";

  src = fetchFromGitHub {
    owner = "google";
    repo = "evcxr";
    rev = "v${version}";
    sha256 = "08zsdl6pkg6dx7k0ns8cd070v7ydsxkscd2ms8wh9r68c08vwzcp";
  };

  cargoSha256 = "1hqlagwl94xcybfqq5h2mrz9296mjns2l598d6jclls7ac5wsdfc";

  nativeBuildInputs = [ pkgconfig makeWrapper ];
  buildInputs = [ zeromq ] ++ stdenv.lib.optional stdenv.isDarwin Security;
  postInstall = ''
    wrapProgram $out/bin/evcxr --prefix PATH : ${stdenv.lib.makeBinPath [ cargo gcc ]}
    rm $out/bin/testing_runtime
  '';

  meta = {
    description = "An evaluation context for Rust";
    homepage = "https://github.com/google/evcxr";
    license = stdenv.lib.licenses.asl20;
    maintainers = [ stdenv.lib.maintainers.protoben ];
    platforms = stdenv.lib.platforms.all;
  };
}