2021-02-05 17:12:51 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
2021-07-21 07:28:18 +00:00
|
|
|
, tags ? [ "autopilotrpc" "signrpc" "walletrpc" "chainrpc" "invoicesrpc" "watchtowerrpc" "routerrpc" "monitoring" ]
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lnd";
|
2021-10-06 13:57:05 +00:00
|
|
|
version = "0.13.3-beta";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lightningnetwork";
|
|
|
|
repo = "lnd";
|
|
|
|
rev = "v${version}";
|
2021-10-06 13:57:05 +00:00
|
|
|
sha256 = "05ai8nyrc8likq5n7i9klfi9550ki8sqklv8axjvi6ql8v9bzk61";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-06 13:57:05 +00:00
|
|
|
vendorSha256 = "0xf8395g6hifbqwbgapllx38y0759xp374sja7j1wk8sdj5ngql5";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
subPackages = ["cmd/lncli" "cmd/lnd"];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
preBuild = let
|
|
|
|
buildVars = {
|
|
|
|
RawTags = lib.concatStringsSep "," tags;
|
|
|
|
GoVersion = "$(go version | egrep -o 'go[0-9]+[.][^ ]*')";
|
|
|
|
};
|
|
|
|
buildVarsFlags = lib.concatStringsSep " " (lib.mapAttrsToList (k: v: "-X github.com/lightningnetwork/lnd/build.${k}=${v}") buildVars);
|
|
|
|
in
|
|
|
|
lib.optionalString (tags != []) ''
|
|
|
|
buildFlagsArray+=("-tags=${lib.concatStringsSep " " tags}")
|
|
|
|
buildFlagsArray+=("-ldflags=${buildVarsFlags}")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightning Network Daemon";
|
|
|
|
homepage = "https://github.com/lightningnetwork/lnd";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cypherpunk2140 prusnak ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-07-18 16:06:22 +00:00
|
|
|
}
|