lark-cli: init at 1.0.58 (#535600)

This commit is contained in:
Oleksii Filonenko
2026-06-29 09:48:53 +00:00
committed by GitHub
2 changed files with 79 additions and 0 deletions
+5
View File
@@ -30996,6 +30996,11 @@
githubId = 25164338;
keys = [ { fingerprint = "065A 0A98 FE61 E1C1 41B0 AFE7 64FA BC62 F457 2875"; } ];
};
zehuajun = {
github = "zehuajun";
githubId = 87254340;
name = "zehuajun";
};
zelkourban = {
name = "zelkourban";
email = "zelo.urban@gmail.com";
+74
View File
@@ -0,0 +1,74 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchurl,
runCommand,
jq,
testers,
}:
buildGoModule (finalAttrs: {
pname = "lark-cli";
version = "1.0.58";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "larksuite";
repo = "cli";
tag = "v${finalAttrs.version}";
hash = "sha256-MqaxcmzX/79vM2EI8wD4ZAFsUfqWvPAovlpmuDP1IWU=";
};
vendorHash = "sha256-M0/Y62Y+M/P1B/YIDjX5bEyB/GKihCWQakTWVd7zvBg=";
subPackages = [ "." ];
postPatch =
let
metaDataRaw = fetchurl {
name = "meta_dataraw.json";
url = "https://web.archive.org/web/20260626061256/https://open.feishu.cn/api/tools/open/api_definition?protocol=meta&client_version=v${finalAttrs.version}";
hash = "sha256-W6KOtDW6gkZIqGa0A5QL0rVjVkRjM+gwW4S3AddPN1M=";
};
metaData =
runCommand "meta_data.json"
{
nativeBuildInputs = [ jq ];
}
''
jq '.data' ${metaDataRaw} > $out
'';
in
''
cp ${metaData} internal/registry/meta_data.json
'';
postInstall = ''
mv $out/bin/cli $out/bin/lark-cli
'';
ldflags = [
"-s"
"-w"
"-X github.com/larksuite/cli/internal/build.Version=v${finalAttrs.version}"
"-X github.com/larksuite/cli/internal/build.Date=2026-06-01"
];
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "lark-cli --version";
version = "v${finalAttrs.version}";
};
meta = {
description = "The official CLI for Lark/Feishu open platform";
homepage = "https://github.com/larksuite/cli";
changelog = "https://github.com/larksuite/cli/releases/tag/v${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ zehuajun ];
mainProgram = "lark-cli";
};
})