blob: 593d7d7a681b57a2df189113a79a1efc7fa6f298 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "api-linter";
version = "1.54.1";
src = fetchFromGitHub {
owner = "googleapis";
repo = "api-linter";
rev = "v${version}";
hash = "sha256-Z3VhjBI1WYLs3uEONgbItkqUX8P5ZTZ84B1YC6hPgu8=";
};
vendorHash = "sha256-EXmS3ys5uFY+7vv22+a/82V2RjTaEMas8SFOXwSS9qY=";
subPackages = [ "cmd/api-linter" ];
ldflags = [
"-s"
"-w"
];
# reference: https://github.com/googleapis/api-linter/blob/v1.54.1/.github/workflows/release.yaml#L76
preBuild = ''
cat > cmd/api-linter/version.go <<EOF
package main
const version = "${version}"
EOF
'';
meta = with lib; {
description = "Linter for APIs defined in protocol buffers";
homepage = "https://github.com/googleapis/api-linter/";
changelog = "https://github.com/googleapis/api-linter/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ xrelkd ];
};
}
|