2023-10-09 19:29:22 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, curl
|
|
|
|
, pkg-config
|
|
|
|
, libgit2_1_5
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cargo-codspeed";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "2.3.2";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CodSpeedHQ";
|
|
|
|
repo = "codspeed-rust";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-TjK84A/hoG5TyXbXgr4SPolUBT9tMqz/Mn9pMK6BQE4=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
cargoHash = "sha256-Nfd8YBh+5HlLbxKajptJEH3NFbtBH2V6668c3DHc13g=";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
curl
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libgit2_1_5
|
|
|
|
openssl
|
|
|
|
zlib
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
2023-11-16 04:20:00 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "-p=cargo-codspeed" ];
|
|
|
|
cargoTestFlags = cargoBuildFlags;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cargo extension to build & run your codspeed benchmarks";
|
|
|
|
homepage = "https://github.com/CodSpeedHQ/codspeed-rust";
|
|
|
|
changelog = "https://github.com/CodSpeedHQ/codspeed-rust/releases/tag/${src.rev}";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
mainProgram = "cargo-codspeed";
|
|
|
|
};
|
|
|
|
}
|