diff --git a/pkgs/by-name/ti/tinfoil-cli/package.nix b/pkgs/by-name/ti/tinfoil-cli/package.nix new file mode 100644 index 000000000000..ab1d9cb6b375 --- /dev/null +++ b/pkgs/by-name/ti/tinfoil-cli/package.nix @@ -0,0 +1,38 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + nix-update-script, +}: + +buildGoModule (finalAttrs: { + pname = "tinfoil-cli"; + version = "0.0.11"; + + src = fetchFromGitHub { + owner = "tinfoilsh"; + repo = "tinfoil-cli"; + tag = "v${finalAttrs.version}"; + hash = "sha256-zHtF6tKptru3OFU5w93pT9B+mbVxqFB++OMleHk7Q5Q="; + }; + + vendorHash = "sha256-EN6IYOSYuSlKpQKcdKvPjFa9A51uwqSzHNuwlrzYsfI="; + + # The attestation test requires internet access + checkFlags = [ "-skip=TestAttestationVerifySEV" ]; + + postInstall = '' + mv $out/bin/tinfoil-cli $out/bin/tinfoil + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Command-line interface for making verified HTTP requests to Tinfoil enclaves and validating attestation documents"; + homepage = "https://github.com/tinfoilsh/tinfoil-cli"; + changelog = "https://github.com/tinfoilsh/tinfoil-cli/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.gpl3Only; + maintainers = [ lib.maintainers.haylin ]; + mainProgram = "tinfoil"; + }; +})