1{ lib
2, stdenvNoCC
3, fetchurl
4}:
5
6stdenvNoCC.mkDerivation rec {
7 pname = "zbctl";
8 version = "8.2.11";
9
10 src = if stdenvNoCC.hostPlatform.system == "x86_64-darwin" then fetchurl {
11 url = "https://github.com/camunda/zeebe/releases/download/${version}/zbctl.darwin";
12 sha256 = "0390n6wmlmfwqf6fvw6wqg6hbrs7bm9x2cdaajlw87377lklypkf";
13 } else if stdenvNoCC.hostPlatform.system == "x86_64-linux" then fetchurl {
14 url = "https://github.com/camunda/zeebe/releases/download/${version}/zbctl";
15 sha256 = "081hc0nynwg014lhsxxyin4rc2i9z6wh8q9i98cjjd8kgr41h096";
16 } else throw "Unsupported platform ${stdenvNoCC.hostPlatform.system}";
17
18 dontUnpack = true;
19 dontConfigure = true;
20 dontBuild = true;
21
22 installPhase = ''
23 runHook preInstall
24 mkdir -p $out/bin
25 cp $src $out/bin/zbctl
26 chmod +x $out/bin/zbctl
27 runHook postInstall
28 '';
29
30 meta = with lib; {
31 description = "The command line interface to interact with Camunda 8 and Zeebe";
32 homepage = "https://docs.camunda.io/docs/apis-clients/cli-client/";
33 downloadPage = "https://github.com/camunda/zeebe/releases";
34 changelog = "https://github.com/camunda/zeebe/releases/tag/${version}";
35 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
36 license = licenses.asl20;
37 platforms = [ "x86_64-darwin" "x86_64-linux" ];
38 maintainers = with maintainers; [ thetallestjj ];
39 longDescription = ''
40 A command line interface for Camunda Platform 8 designed to create and read resources inside a Zeebe broker.
41 It can be used for regular development and maintenance tasks such as:
42 * Deploying processes
43 * Creating process instances and job workers
44 * Activating, completing, or failing jobs
45 * Updating variables and retries
46 * Viewing cluster status
47 '';
48 };
49}