depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-codspeed/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

51 lines
1.1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, curl
, pkg-config
, libgit2_1_5
, openssl
, zlib
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-codspeed";
version = "2.3.3";
src = fetchFromGitHub {
owner = "CodSpeedHQ";
repo = "codspeed-rust";
rev = "v${version}";
hash = "sha256-8wbJFvAXicchxI8FTthCiuYCZ2WA4nMUJTUD4WKG5FI=";
};
cargoHash = "sha256-HkFROhjx4bh9QMUlCT1xj3s7aUQxn0ef3FCXoEsYCnY=";
nativeBuildInputs = [
curl
pkg-config
];
buildInputs = [
curl
libgit2_1_5
openssl
zlib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
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";
};
}