From e2f71a4e5c4dbafbf4ebc88d47282c3789ddfb14 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 30 Apr 2026 17:09:07 +0200 Subject: [PATCH] thunderbird-cli-bridge: init at 1.0.2 --- .../th/thunderbird-cli-bridge/package.nix | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pkgs/by-name/th/thunderbird-cli-bridge/package.nix diff --git a/pkgs/by-name/th/thunderbird-cli-bridge/package.nix b/pkgs/by-name/th/thunderbird-cli-bridge/package.nix new file mode 100644 index 000000000000..ff5daca16388 --- /dev/null +++ b/pkgs/by-name/th/thunderbird-cli-bridge/package.nix @@ -0,0 +1,48 @@ +{ + lib, + buildNpmPackage, + fetchFromGitHub, + nix-update-script, +}: + +buildNpmPackage (finalAttrs: { + pname = "thunderbird-cli-bridge"; + version = "1.0.2"; + + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "vitalio-sh"; + repo = "thunderbird-cli"; + tag = "v${finalAttrs.version}"; + hash = "sha256-jtIXOHjijFkwdh5FWrqdSfEwbEmWQud8Qr2jsTEwJts="; + }; + + forceEmptyCache = true; + dontNpmBuild = true; + + npmWorkspace = "bridge"; + npmDepsHash = "sha256-ixzfebmKITD1lnPNQq765S1f+i7xBTTWWdZoJOqY7qg="; + + # TODO: revisit this when https://github.com/NixOS/nixpkgs/pull/333759 has landed + postInstall = '' + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/thunderbird-cli-bridge + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/.bin/tb + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/.bin/tb-bridge + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/.bin/tb-mcp + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/thunderbird-cli + rm -rf $out/lib/node_modules/thunderbird-cli/node_modules/thunderbird-cli-mcp + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "HTTP/WebSocket bridge daemon between thunderbird-cli (or any HTTP client) and the Thunderbird-cli WebExtension. Stateless proxy, localhost-only."; + homepage = "https://github.com/vitalio-sh/thunderbird-cli"; + changelog = "https://github.com/vitalio-sh/thunderbird-cli/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ drupol ]; + mainProgram = "tb-bridge"; + platforms = lib.platforms.all; + }; +})