fiatjaf / sparko

c-lightning RPC over HTTP with fine-grained permissions, SSE and spark-wallet support
38 stars 12 forks source link

Move invoicewithdescriptionhash to seperate repo and only compile current arch by default? #19

Closed Sjors closed 2 years ago

Sjors commented 2 years ago

When using invoicewithdescriptionhash plugin with BTCPay, it might be easier for folks to understand how to install it, if it lived in its own repo. The other thing I found confusing is the cross compilation.

Addition suggested documentation:

Install Go and gox: go get github.com/mitchellh/gox && go install github.com/mitchellh/gox. Check if gox -h works, you may need to add ~/go/bin to your PATH.

git clone THE_REPO
cd THE_REPO
make # assuming it's now in the root of the repo
mkdir -p ~/.lightning/plugins
cp sparko/invoicewithdescriptionhash/cmd/dist/invoicewithdescriptionhash_linux_amd64 ~/.lightning/plugin

Restart c-lighting.

When updating, stop c-lightning before copying the updated binary.

fiatjaf commented 2 years ago

Thank you. Yes, I agree. I was planning on doing this someday.

Initially this wasn't supposed to be a separate plugin, that's why it is so half-assed separated inside this repo and with no documentation (also because it is a little too burdensome to write very complete documentation for stuff literally no one was using besides myself and MrKukks when bundling stuff to the BTCPayServer docker releases).

But if you look inside the Makefile you'll see you don't need gox. You can just run go build -- which is also something any Go programmer would know and automatically try (of course I didn't realize people without experience in Go would ever try to compile this).

Sjors commented 2 years ago

My go skills are a no-go :-)

fiatjaf commented 2 years ago

https://github.com/fiatjaf/invoicewithdescriptionhash