Skip to content

Commit

Permalink
albyhub: init at 1.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bleetube committed Dec 28, 2024
1 parent 308f45a commit 4793875
Show file tree
Hide file tree
Showing 6 changed files with 3,748 additions and 0 deletions.
43 changes: 43 additions & 0 deletions pkgs/by-name/al/albyhub/breez-sdk-go/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
go,
}:

buildGoModule rec {
pname = "breez-sdk-go";
version = "0.6.6";

src = fetchFromGitHub {
owner = "breez";
repo = "breez-sdk-go";
rev = "v${version}";
hash = "sha256-y9VC2sMnxAmQftXRa8RSX0wxhugWdMHmMlb52qrHMgk=";
};

vendorHash = null;

ldflags = [ "-s" "-w" ];

installPhase = ''
mkdir -p $out/lib
case ${go.GOARCH} in
amd64|aarch64)
cp -v "${src}/breez_sdk/lib/linux-${go.GOARCH}/libbreez_sdk_bindings.so" $out/lib/
;;
*)
echo "Unsupported architecture: ${go.GOARCH}"
exit 1
;;
esac
'';

meta = {
description = "Embeds the BreezSDK runtime compiled as shared library objects";
homepage = "https://github.com/breez/breez-sdk-go/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bleetube ];
};
}
44 changes: 44 additions & 0 deletions pkgs/by-name/al/albyhub/glalby-go/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
}:

buildGoModule rec {
pname = "glalby-go";
version = "unstable-2024-06-21";

src = fetchFromGitHub {
owner = "getAlby";
repo = "glalby-go";
rev = "95673c864d5954a6f78a24600876784b81af799f";
hash = "sha256-DwYOJkk0VzCMzHMUM+C31Kq8e6jIsBZNBQLgpylOe4E=";
};

vendorHash = null;

ldflags = [ "-s" "-w" ];

CGO_ENABLED=1;

installPhase = ''
mkdir -p $out/lib
case ${stdenv.hostPlatform.parsed.cpu.name} in
x86_64|aarch64)
cp -v "${src}/glalby/${stdenv.hostPlatform.parsed.cpu.name}-unknown-linux-gnu/libglalby_bindings.so" $out/lib/
;;
*)
echo "Unsupported architecture: ${stdenv.hostPlatform.parsed.cpu.name}"
exit 1
;;
esac
'';

meta = {
description = "Go bindings for https://github.com/getalby/glalby";
homepage = "https://github.com/getAlby/glalby-go";
license = lib.licenses.asl20; # https://github.com/getAlby/ldk-node-go/issues/27
maintainers = with lib.maintainers; [ bleetube ];
};
}
57 changes: 57 additions & 0 deletions pkgs/by-name/al/albyhub/ldk-node-go/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
lib,
buildGoModule,
fetchFromGitHub,
stdenv,
}:

buildGoModule rec {
pname = "ldk-node-go";
version = "unstable-2024-12-23";

src = fetchFromGitHub {
owner = "getAlby";
repo = "ldk-node-go";
rev = "4831e085572046edccdbea2091ca352a61a9babc";
hash = "sha256-NEhDoGR+a2MH2npL7TUNqPjVeX+sUYidxkg222zB9Jg=";
};

vendorHash = null;

ldflags = [ "-s" "-w" ];

CGO_ENABLED=1;

# unpackPhase = "true";
# nativeBuildInputs = [ ];

installPhase = ''
mkdir -p $out/lib
case ${stdenv.hostPlatform.parsed.cpu.name} in
x86_64|aarch64)
cp -v "${src}/ldk_node/${stdenv.hostPlatform.parsed.cpu.name}-unknown-linux-gnu/libldk_node.so" $out/lib/
;;
*)
echo "Unsupported architecture: ${stdenv.hostPlatform.parsed.cpu.name}"
exit 1
;;
esac
'';

# If the library references itself by relative RPATH, you might want to do a patchelf step here.
# Example:
# postInstall = ''
# patchelf --set-rpath $out/lib $out/lib/libldk_node.so
# '';

# If you want to pass along a .pc file, or anything else for pkg-config, do so here.


meta = {
description = "Experimental Go bindings for LDK-node";
homepage = "https://github.com/getAlby/ldk-node-go";
license = lib.licenses.asl20; # https://github.com/getAlby/ldk-node-go/issues/27
maintainers = with lib.maintainers; [ ];
mainProgram = "ldk-node-go";
};
}
Loading

0 comments on commit 4793875

Please sign in to comment.