1{
2 lib,
3 fetchFromGitHub,
4 pkg-config,
5 gitMinimal,
6 rustPlatform,
7 openssl,
8}:
9
10rustPlatform.buildRustPackage rec {
11 pname = "git-metrics";
12 version = "0.2.6";
13
14 src = fetchFromGitHub {
15 owner = "jdrouet";
16 repo = "git-metrics";
17 tag = "v${version}";
18 hash = "sha256-SdA/FpdrbC36Ny7aBpTUvFldbYXyajSqWGheaDPHYoE=";
19 };
20
21 cargoHash = "sha256-e4CdpwoFl8leV5HJWkWBpvPrVrk+7vq49yTPkpeQ2Ng=";
22
23 buildInputs = [
24 openssl
25 ];
26
27 nativeCheckInputs = [
28 pkg-config
29 gitMinimal
30 ];
31
32 checkFlags = [
33 # requires git author information to be detectable
34 "--skip=tests::check_budget::execute::with_command_backend"
35 "--skip=tests::check_budget::execute::with_git2_backend"
36 "--skip=tests::conflict_different::execute::with_command_backend"
37 "--skip=tests::conflict_different::execute::with_git2_backend"
38 "--skip=tests::display_diff::execute"
39 "--skip=tests::simple_use_case::execute::with_command_backend"
40 "--skip=tests::simple_use_case::execute::with_git2_backend"
41 ];
42
43 meta = {
44 homepage = "https://github.com/jdrouet/git-metrics";
45 description = "Git extension to be able to track metrics about your project, within the git repository";
46 license = [ lib.licenses.mit ];
47 maintainers = with lib.maintainers; [
48 matthiasbeyer
49 ];
50 mainProgram = "git-metrics";
51 };
52}