-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
3,791 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
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 | ||
''; | ||
|
||
postInstall = '' | ||
patchelf --set-rpath $out/lib $out/lib/libbreez_sdk_bindings.so | ||
''; | ||
|
||
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
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 | ||
''; | ||
|
||
postInstall = '' | ||
patchelf --set-rpath $out/lib $out/lib/libglalby_bindings.so | ||
''; | ||
|
||
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
''; | ||
|
||
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"; | ||
}; | ||
} |
Oops, something went wrong.