File tree Expand file tree Collapse file tree 3 files changed +46
-2
lines changed
Expand file tree Collapse file tree 3 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -37,5 +37,10 @@ let self = {
3737
3838 pinned = import ./pinned.nix pkgs pkgsUnstable ;
3939
40+ # TODO-EXTERNAL:
41+ # Remove this when https://github.com/NixOS/nixpkgs/pull/195337 is available in the
42+ # nixpkgs-unstable channel
43+ lnd = pkgsUnstable . callPackage ./lnd-0.15.2.nix { } ;
44+
4045 modulesPkgs = self // self . pinned ;
4146} ; in self
Original file line number Diff line number Diff line change 1+ { buildGoModule
2+ , fetchFromGitHub
3+ , lib
4+ , tags ? [ "autopilotrpc" "signrpc" "walletrpc" "chainrpc" "invoicesrpc" "watchtowerrpc" "routerrpc" "monitoring" "kvdb_postgres" "kvdb_etcd" ]
5+ } :
6+
7+ buildGoModule rec {
8+ pname = "lnd" ;
9+ version = "0.15.2-beta" ;
10+
11+ src = fetchFromGitHub {
12+ owner = "lightningnetwork" ;
13+ repo = "lnd" ;
14+ rev = "v${ version } " ;
15+ sha256 = "sha256-C7BZ6awY2v5Uvvh12YEosoEQyJoetWzH/1wIQSVjtEk=" ;
16+ } ;
17+
18+ vendorSha256 = "sha256-rCdcPkgrFcDfLfF8wipFws7YTKEgotuVqVIJYLMOxbs=" ;
19+
20+ subPackages = [ "cmd/lncli" "cmd/lnd" ] ;
21+
22+ preBuild = let
23+ buildVars = {
24+ RawTags = lib . concatStringsSep "," tags ;
25+ GoVersion = "$(go version | egrep -o 'go[0-9]+[.][^ ]*')" ;
26+ } ;
27+ buildVarsFlags = lib . concatStringsSep " " ( lib . mapAttrsToList ( k : v : "-X github.com/lightningnetwork/lnd/build.${ k } =${ v } " ) buildVars ) ;
28+ in
29+ lib . optionalString ( tags != [ ] ) ''
30+ buildFlagsArray+=("-tags=${ lib . concatStringsSep " " tags } ")
31+ buildFlagsArray+=("-ldflags=${ buildVarsFlags } ")
32+ '' ;
33+
34+ meta = with lib ; {
35+ description = "Lightning Network Daemon" ;
36+ homepage = "https://github.com/lightningnetwork/lnd" ;
37+ license = licenses . mit ;
38+ maintainers = with maintainers ; [ cypherpunk2140 prusnak ] ;
39+ } ;
40+ }
Original file line number Diff line number Diff line change @@ -17,8 +17,7 @@ pkgs: pkgsUnstable:
1717 elementsd
1818 fulcrum
1919 hwi
20- lightning-loop
21- lnd ;
20+ lightning-loop ;
2221
2322 inherit pkgs pkgsUnstable ;
2423}
You can’t perform that action at this time.
0 commit comments