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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
};

overlays = {
development = import ./nix/overlays/development.nix;
native = import ./nix/overlays/native.nix;
# A top-level nixpkgs overlay that extends supported GHC package sets with
# `hs-temporal-sdk` packages & any dependency modifications required for
Expand Down
4 changes: 4 additions & 0 deletions nix/overlays/development.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
final: prev:
{
temporal-cli = final.callPackage ../packages/temporal-cli.nix { };
}
73 changes: 73 additions & 0 deletions nix/packages/temporal-cli.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
stdenvNoCC,
lib,
fetchurl,
}:

let
# NOTE(jkachmar): Wow I hate Go! It turns out that if any dependencies of
# some project has a requirement on a newer Go toolchain than what you
# provide, there's no way to patch this without forking the dependency
# and modifying /its/ 'go.mod' file.
#
# In lieu of forking the 'temporal' Go package just to make a one-line edit
# (or trying to override that and then shim it into the 'temporal-cli'
# module derivation), just download pre-build artifacts for now.
#
# We can probably switch back to the source build once we update to a version
# of nixpkgs that has Go 1.25, but the general problem is just going to show
# up again once upstream uses a newer version of Go than we have on hand.

version = "1.5.1";
systems = {
x86_64-linux = {
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_linux_amd64.tar.gz";
hash = "sha256-3cleCLCwdu/U6pczo/SI630r6HX4g05hbNKjc1i0hS0=";
};
aarch64-linux = {
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_linux_arm64.tar.gz";
hash = "sha256-vRsNufGLBRAm3ov2zBUF8lEPFLu3qLmkqR//Rsd0VPU=";
};
x86_64-darwin = {
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_darwin_amd64.tar.gz";
hash = "sha256-u7c+KjETWr5QofHNs1AwxClh32GOjOnGCuifIBVAxdk=";
};
aarch64-darwin = {
url = "https://github.com/temporalio/cli/releases/download/v1.5.1/temporal_cli_${version}_darwin_arm64.tar.gz";
hash = "sha256-zKAbfqNa1W4qMo2a5Za/cWvSIxPvY8enYciDVEV8JBU=";
};
};

srcFor =
system:
fetchurl {
url = systems.${system}.url;
hash = systems.${system}.hash;
};
in
stdenvNoCC.mkDerivation {
pname = "temporal";
inherit version;

src = srcFor stdenvNoCC.system;
sourceRoot = ".";

doInstallCheck = true;
dontPatch = true;
dontBuild = true;
dontConfigure = true;
dontStrip = true;

installPhase = ''
mkdir -p $out/bin
install -Dm755 temporal $out/bin/temporal
'';

passthru.sources = lib.mapAttrs (name: _: srcFor name) systems;

meta = {
description = "Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal";
mainProgram = "temporal";
license = lib.licenses.mit;
};
}
1 change: 1 addition & 0 deletions nix/utils/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ let
inherit system;
overlays = [
fenix.overlays.default
self.overlays.development
self.overlays.native
self.overlays.haskell-development
];
Expand Down