nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 curl,
3 fetchFromGitHub,
4 lib,
5 libgit2,
6 openssl,
7 pkg-config,
8 rustPlatform,
9 zlib,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "cargo-codspeed";
14 version = "4.3.0";
15
16 src = fetchFromGitHub {
17 owner = "CodSpeedHQ";
18 repo = "codspeed-rust";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-aOuKz7LEQU9hqJUw0M759A4zk8+9UhiMAnO7OwBc+T0=";
21 };
22
23 cargoHash = "sha256-K1xm8Kw7TMspFmqvW4qRf4QXddarw3eUDTIuwbg1pGA=";
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 = finalAttrs.cargoBuildFlags;
39 checkFlags = [
40 # requires an extra dependency, blit
41 "--skip=test_package_in_deps_build"
42
43 # requires criteron, which requires additional dependencies
44 "--skip=test_cargo_config_rustflags"
45
46 # requires additional dependencies
47 "--skip=test_criterion_build_and_run_filtered_by_name"
48 "--skip=test_criterion_build_and_run_filtered_by_name_single"
49 ];
50
51 env = {
52 LIBGIT2_NO_VENDOR = 1;
53 };
54
55 meta = {
56 changelog = "https://github.com/CodSpeedHQ/codspeed-rust/releases/tag/v${finalAttrs.version}";
57 description = "Cargo extension to build & run your codspeed benchmarks";
58 homepage = "https://github.com/CodSpeedHQ/codspeed-rust";
59 license = with lib.licenses; [
60 mit
61 asl20
62 ];
63 mainProgram = "cargo-codspeed";
64 maintainers = with lib.maintainers; [ hythera ];
65 };
66})