Skip to content

Commit 9fc05e3

Browse files
committed
Merge #553: pkgs: add lnd 0.15.2
cf836b5 pkgs: add lnd 0.15.2 (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACK cf836b5 Tree-SHA512: 499cf4989f432946e0ec476cb0c22975614f05e8958c616a5897026098613dd7a20be83e144defdf19b0bf86c3cbd2f6cabb8397d40b1e3bcbda96d9b5e12860
2 parents 34f6eb9 + cf836b5 commit 9fc05e3

File tree

3 files changed

+46
-2
lines changed

3 files changed

+46
-2
lines changed

pkgs/default.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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

pkgs/lnd-0.15.2.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
}

pkgs/pinned.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)