feat(albyhub): vendor v1.24.0 LND-only, no-frontend build

Replace the nixpkgs albyhub overrideAttrs patch-chain with a fully
vendored package at packages/albyhub for v1.24.0.

- modules/core/sovran-hub.nix: bump fallback version 1.8.0 -> 1.24.0
- modules/nwc-wallets.nix: build via pkgs.callPackage ../packages/albyhub
- packages/albyhub:
  - drop 0002-isolated-invoice-app-id.patch (fixed upstream)
  - add 0004-lnd-only.patch: strip LDK/Bark/Cashu/CLN/Phoenix backends
    from service/start.go, leaving only the LND case
  - add 0005-no-frontend.patch: remove //go:embed dist and the
    frontend handler registration
  - add default.nix: buildGoModule for v1.24.0 with no nodejs/yarn/
    bark-ffi-go/ldk-node deps (only stdenv.cc.cc), subPackages cmd/http

Keeps 0001-private-route-hints and 0003-loopback-bind-host. Does not
touch flake.nix, VERSION, or CHANGELOG.
This commit is contained in:
2026-08-25 19:11:25 -05:00
parent 14db4282b7
commit d600198049
6 changed files with 244 additions and 79 deletions
+55
View File
@@ -0,0 +1,55 @@
{ lib
, buildGoModule
, fetchFromGitHub
, stdenv
}:
buildGoModule (finalAttrs: {
pname = "albyhub";
version = "1.24.0";
src = fetchFromGitHub {
owner = "getAlby";
repo = "hub";
tag = "v${finalAttrs.version}";
hash = "sha256-IC3rl/9aJ88GgvGfhcJb1/pQb3xIkhYih1hLPJ8itP8=";
};
vendorHash = "sha256-A4OsntoJUDkvWJxnZFFxw5AjUPmwRl764nQ5FEA2yeo=";
patches = [
./0001-private-route-hints.patch
./0003-loopback-bind-host.patch
./0004-lnd-only.patch
./0005-no-frontend.patch
];
# LND-only, no-frontend build: the only native dependency needed for
# cgo (sqlite3) is the C/C++ runtime from stdenv.cc.cc. No nodejs/yarn
# (no frontend), no bark-ffi-go or ldk-node (removed backends).
buildInputs = [
(lib.getLib stdenv.cc.cc)
];
subPackages = [
"cmd/http"
];
ldflags = [
"-X github.com/getAlby/hub/version.Tag=v${finalAttrs.version}"
"-s"
"-w"
];
postInstall = ''
mv $out/bin/http $out/bin/albyhub
'';
meta = {
description = "Control lightning wallets over nostr";
homepage = "https://github.com/getAlBy/hub";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
mainProgram = "albyhub";
};
})