1{
2 lib,
3 fetchFromGitHub,
4 buildGoModule,
5 testers,
6 temporal,
7}:
8
9buildGoModule rec {
10 pname = "temporal";
11 version = "1.28.0";
12
13 src = fetchFromGitHub {
14 owner = "temporalio";
15 repo = "temporal";
16 rev = "v${version}";
17 hash = "sha256-LH6utz2SCupF0juXVL+NFO/DQ+inQbOYSyoyTMl5a+w=";
18 };
19
20 vendorHash = "sha256-ycS7uXXNQ6NHuiL796Chc4G2TVNgovn2sXn3k1Ls87Y=";
21
22 excludedPackages = [ "./build" ];
23
24 env.CGO_ENABLED = 0;
25
26 tags = [ "test_dep" ];
27 ldflags = [
28 "-s"
29 "-w"
30 ];
31
32 # There too many integration tests.
33 doCheck = false;
34
35 installPhase = ''
36 runHook preInstall
37
38 mkdir -p $out/share
39 cp -r ./schema $out/share/
40
41 install -Dm755 "$GOPATH/bin/server" -T $out/bin/temporal-server
42 install -Dm755 "$GOPATH/bin/cassandra" -T $out/bin/temporal-cassandra-tool
43 install -Dm755 "$GOPATH/bin/sql" -T $out/bin/temporal-sql-tool
44 install -Dm755 "$GOPATH/bin/tdbg" -T $out/bin/tdbg
45
46 runHook postInstall
47 '';
48
49 passthru.tests.version = testers.testVersion {
50 package = temporal;
51 };
52
53 meta = {
54 description = "Microservice orchestration platform which enables developers to build scalable applications without sacrificing productivity or reliability";
55 homepage = "https://temporal.io";
56 changelog = "https://github.com/temporalio/temporal/releases/tag/v${version}";
57 license = lib.licenses.mit;
58 maintainers = with lib.maintainers; [ jpds ];
59 mainProgram = "temporal-server";
60 };
61}