WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0ba5045

Browse files
committed
chore(deps): update temporal-cli 1.3.0 -> 1.5.1
this won't be necessary whenever we update our nixpkgs pin, but for now it's not too much extra work to vendor a derivation that pulls in the precompiled CLI binary. since this isn't something that's /strictly/ necessary for build/test, it's going in a separate 'development' overlay so people don't implicitly pull it in if they just want the native bridge library & test server.
1 parent e00e7e0 commit 0ba5045

File tree

4 files changed

+79
-0
lines changed

4 files changed

+79
-0
lines changed

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
};
7272

7373
overlays = {
74+
development = import ./nix/overlays/development.nix;
7475
native = import ./nix/overlays/native.nix;
7576
# A top-level nixpkgs overlay that extends supported GHC package sets with
7677
# `hs-temporal-sdk` packages & any dependency modifications required for

nix/overlays/development.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
final: prev:
2+
{
3+
temporal-cli = final.callPackage ../packages/temporal-cli.nix { };
4+
}

nix/packages/temporal-cli.nix

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
stdenvNoCC,
3+
lib,
4+
fetchurl,
5+
}:
6+
7+
let
8+
# NOTE(jkachmar): Wow I hate Go! It turns out that if any dependencies of
9+
# some project has a requirement on a newer Go toolchain than what you
10+
# provide, there's no way to patch this without forking the dependency
11+
# and modifying /its/ 'go.mod' file.
12+
#
13+
# In lieu of forking the 'temporal' Go package just to make a one-line edit
14+
# (or trying to override that and then shim it into the 'temporal-cli'
15+
# module derivation), just download pre-build artifacts for now.
16+
#
17+
# We can probably switch back to the source build once we update to a version
18+
# of nixpkgs that has Go 1.25, but the general problem is just going to show
19+
# up again once upstream uses a newer version of Go than we have on hand.
20+
21+
version = "1.5.1";
22+
systems = {
23+
x86_64-linux = {
24+
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_linux_amd64.tar.gz";
25+
hash = "sha256-3cleCLCwdu/U6pczo/SI630r6HX4g05hbNKjc1i0hS0=";
26+
};
27+
aarch64-linux = {
28+
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_linux_arm64.tar.gz";
29+
hash = "sha256-vRsNufGLBRAm3ov2zBUF8lEPFLu3qLmkqR//Rsd0VPU=";
30+
};
31+
x86_64-darwin = {
32+
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_darwin_amd64.tar.gz";
33+
hash = "sha256-u7c+KjETWr5QofHNs1AwxClh32GOjOnGCuifIBVAxdk=";
34+
};
35+
aarch64-darwin = {
36+
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_darwin_arm64.tar.gz";
37+
hash = "sha256-zKAbfqNa1W4qMo2a5Za/cWvSIxPvY8enYciDVEV8JBU=";
38+
};
39+
};
40+
41+
srcFor =
42+
system:
43+
fetchurl {
44+
url = systems.${system}.url;
45+
hash = systems.${system}.hash;
46+
};
47+
in
48+
stdenvNoCC.mkDerivation {
49+
pname = "temporal";
50+
inherit version;
51+
52+
src = srcFor stdenvNoCC.system;
53+
sourceRoot = ".";
54+
55+
doInstallCheck = true;
56+
dontPatch = true;
57+
dontBuild = true;
58+
dontConfigure = true;
59+
dontStrip = true;
60+
61+
installPhase = ''
62+
mkdir -p $out/bin
63+
install -Dm755 temporal $out/bin/temporal
64+
'';
65+
66+
passthru.sources = lib.mapAttrs (name: _: srcFor name) systems;
67+
68+
meta = {
69+
description = "Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal";
70+
mainProgram = "temporal";
71+
license = lib.licenses.mit;
72+
};
73+
}

nix/utils/flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let
1212
inherit system;
1313
overlays = [
1414
fenix.overlays.default
15+
self.overlays.development
1516
self.overlays.native
1617
self.overlays.haskell-development
1718
];

0 commit comments

Comments
 (0)