| 1 |
{ |
| 2 |
lib, |
| 3 |
rustPlatform, |
| 4 |
fetchFromGitHub, |
| 5 |
curl, |
| 6 |
pkg-config, |
| 7 |
libgit2, |
| 8 |
openssl, |
| 9 |
zlib, |
| 10 |
}: |
| 11 |
|
| 12 |
rustPlatform.buildRustPackage rec { |
| 13 |
pname = "cargo-codspeed"; |
| 14 |
version = "4.2.0"; |
| 15 |
|
| 16 |
src = fetchFromGitHub { |
| 17 |
owner = "CodSpeedHQ"; |
| 18 |
repo = "codspeed-rust"; |
| 19 |
rev = "v${version}"; |
| 20 |
hash = "sha256-ofVgb+9YUNiCPhRZHY3Fm1nXRZK+9Uq8pc5XAm3P6oU="; |
| 21 |
}; |
| 22 |
|
| 23 |
cargoHash = "sha256-xcLs2Tdi7wp7F5Jwl1QvEC1wQeK7pBjBZKxGVrzqzu0="; |
| 24 |
|
| 25 |
nativeBuildInputs = [ |
| 26 |
curl |
| 27 |
pkg-config |
| 28 |
]; |
| 29 |
|
| 30 |
buildInputs = [ |
| 31 |
curl |
| 32 |
libgit2 |
| 33 |
openssl |
| 34 |
zlib |
| 35 |
]; |
| 36 |
|
| 37 |
cargoBuildFlags = [ "-p=cargo-codspeed" ]; |
| 38 |
cargoTestFlags = cargoBuildFlags; |
| 39 |
checkFlags = [ |
| 40 |
# requires an extra dependency, blit |
| 41 |
"--skip=test_package_in_deps_build" |
| 42 |
# blah |
| 43 |
"--skip=test_cargo_config_rustflags" |
| 44 |
"--skip=test_criterion_build_and_run_filtered_by_name" |
| 45 |
"--skip=test_criterion_build_and_run_filtered_by_name_single" |
| 46 |
]; |
| 47 |
|
| 48 |
env = { |
| 49 |
LIBGIT2_NO_VENDOR = 1; |
| 50 |
}; |
| 51 |
|
| 52 |
meta = with lib; { |
| 53 |
description = "Cargo extension to build & run your codspeed benchmarks"; |
| 54 |
homepage = "https://github.com/CodSpeedHQ/codspeed-rust"; |
| 55 |
changelog = "https://github.com/CodSpeedHQ/codspeed-rust/releases/tag/${src.rev}"; |
| 56 |
license = with licenses; [ |
| 57 |
mit |
| 58 |
asl20 |
| 59 |
]; |
| 60 |
maintainers = with maintainers; [ figsoda ]; |
| 61 |
mainProgram = "cargo-codspeed"; |
| 62 |
}; |
| 63 |
} |