api-linter: init at 1.54.1

This commit is contained in:
xrelkd 2023-07-23 18:20:13 +08:00
parent ffce3e3818
commit 478e0e9e4a
No known key found for this signature in database
GPG Key ID: BAB7A457C1D1D6B3
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,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 ];
};
}

View File

@ -3023,6 +3023,8 @@ with pkgs;
apfsprogs = callPackage ../tools/filesystems/apfsprogs { }; apfsprogs = callPackage ../tools/filesystems/apfsprogs { };
api-linter = callPackage ../development/tools/api-linter { };
apk-tools = callPackage ../tools/package-management/apk-tools { apk-tools = callPackage ../tools/package-management/apk-tools {
lua = lua5_3; lua = lua5_3;
}; };