about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/cargo-rr/default.nix
blob: 5ffbb9fe992aebb1d33de842c50db93de6bb2d85 (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
31
32
33
34
35
36
37
38
39
40
41
{ lib
, rustPlatform
, fetchFromGitHub
, gitUpdater
, common-updater-scripts
, makeWrapper
, rr
}:

rustPlatform.buildRustPackage rec {
  pname = "cargo-rr";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "danielzfranklin";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-lQS+bp1u79iO8WGrkZSFEuonr1eYjxIQYhUvM/kBao4";
  };

  cargoSha256 = "sha256-PdKqWMxTtBJbNqITs3IjNcpijXy6MHitEY4jDp4jZro=";

  passthru = {
    updateScript = gitUpdater {
      rev-prefix = "v";
    };
  };

  nativeBuildInputs = [ makeWrapper ];

  postInstall = ''
    wrapProgram $out/bin/cargo-rr --prefix PATH : ${lib.makeBinPath [ rr ]}
  '';

  meta = with lib; {
    description = "Cargo subcommand \"rr\": a light wrapper around rr, the time-travelling debugger";
    homepage = "https://github.com/danielzfranklin/cargo-rr";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ otavio matthiasbeyer ];
  };
}