1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nix-update-script,
6}:
7
8buildGoModule (finalAttrs: {
9 pname = "tinfoil-cli";
10 version = "0.1.3";
11
12 src = fetchFromGitHub {
13 owner = "tinfoilsh";
14 repo = "tinfoil-cli";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-yOFlQxMRxrdC1w8r8D9b0qrwGLjEflgcvLX5Q8ntMJY=";
17 };
18
19 vendorHash = "sha256-L4wdnxm5fOtGymIZfr/YYTDnXpREgZmEthcZV1ploI4=";
20
21 # The attestation test requires internet access
22 checkFlags = [ "-skip=TestAttestationVerifySEV" ];
23
24 postInstall = ''
25 mv $out/bin/tinfoil-cli $out/bin/tinfoil
26 '';
27
28 passthru.updateScript = nix-update-script { };
29
30 meta = {
31 description = "Command-line interface for making verified HTTP requests to Tinfoil enclaves and validating attestation documents";
32 homepage = "https://github.com/tinfoilsh/tinfoil-cli";
33 changelog = "https://github.com/tinfoilsh/tinfoil-cli/releases/tag/v${finalAttrs.version}";
34 license = lib.licenses.gpl3Only;
35 maintainers = [ lib.maintainers.haylin ];
36 mainProgram = "tinfoil";
37 };
38})