about summary refs log tree commit diff
path: root/pkgs/by-name/ca/cargo-profiler/package.nix
blob: 595bf6d8d032e22112ff72441484f3fcca743b0b (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
{ fetchFromGitHub
, lib
, rustPlatform }:

let
  # Constants
  pname = "cargo-profiler";
  owner = "svenstaro";

  # Version-specific variables
  version = "0.2.0";
  rev = "0a8ab772fd5c0f1579e4847c5d05aa443ffa2bc8";
  sha256 = "sha256-ZRAbvSMrPtgaWy9RwlykQ3iiPxHCMh/tS5p67/4XqqA=";
  cargoSha256 = "sha256-qt3S6ZcLEP9ZQoP5+kSQdmBlxdMgGUqLszdU7JkFNVI=";

  inherit (rustPlatform) buildRustPackage;
in buildRustPackage rec {
  inherit pname version;

  src = fetchFromGitHub {
    inherit owner rev sha256;
    repo = pname;
  };

  inherit cargoSha256;

  meta = with lib; {
    description = "Cargo subcommand for profiling Rust binaries";
    mainProgram = "cargo-profiler";
    homepage = "https://github.com/svenstaro/cargo-profiler";
    license = licenses.mit;
    maintainers = with maintainers; [ lucperkins ];
  };
}