nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchzip,
5 testers,
6 tigerbeetle,
7 nix-update-script,
8}:
9let
10 platform =
11 if stdenvNoCC.hostPlatform.isDarwin then "universal-macos" else stdenvNoCC.hostPlatform.system;
12 hash = builtins.getAttr platform {
13 "universal-macos" = "sha256-BNcfAJMFE+4xUxRwQ6J3mmOsAHWGXZ+X6XygjirIA8o=";
14 "x86_64-linux" = "sha256-pQNNSWQSbG06sdpoloNXFFOwRNHT/6gIlETiQnLGcko=";
15 "aarch64-linux" = "sha256-BZlRtoBnsNePmmtu56te7rMG5mVjDugsog8+rWYHeZg=";
16 };
17in
18stdenvNoCC.mkDerivation (finalAttrs: {
19 pname = "tigerbeetle";
20 version = "0.16.51";
21
22 src = fetchzip {
23 url = "https://github.com/tigerbeetle/tigerbeetle/releases/download/${finalAttrs.version}/tigerbeetle-${platform}.zip";
24 inherit hash;
25 };
26
27 dontUnpack = true;
28 dontConfigure = true;
29 dontBuild = true;
30
31 installPhase = ''
32 runHook preInstall
33
34 mkdir -p $out/bin
35 cp $src/tigerbeetle $out/bin/tigerbeetle
36
37 runHook postInstall
38 '';
39
40 passthru = {
41 tests.version = testers.testVersion {
42 package = tigerbeetle;
43 command = "tigerbeetle version";
44 };
45 updateScript = ./update.sh;
46 };
47
48 meta = {
49 homepage = "https://tigerbeetle.com/";
50 description = "Financial accounting database designed to be distributed and fast";
51 license = lib.licenses.asl20;
52 maintainers = with lib.maintainers; [
53 danielsidhion
54 nwjsmith
55 ];
56 platforms = [
57 "x86_64-linux"
58 "aarch64-linux"
59 ]
60 ++ lib.platforms.darwin;
61 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
62 mainProgram = "tigerbeetle";
63 };
64})