forked from ElementsProject/peerswap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.nix
46 lines (41 loc) · 1.57 KB
/
packages.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
let
# Pinning to revision 93dc85b485638bda9ac76458dcd45b997cc7cdbd
# - cln v0.12.1
# - lnd v0.15.2-beta
# - bitcoin v23.0
rev = "93dc85b485638bda9ac76458dcd45b997cc7cdbd";
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
pkgs = import nixpkgs {};
# Need an lnd v0.15.4-beta for an emergency fix in lnd.
lndemergencyrev = "991a5ca464eaf59e50f3f0d102f4216f2f9d18f5";
lndemergencynixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/archive/${lndemergencyrev}.tar.gz";
lndemergencypkgs = import lndemergencynixpkgs {};
# Override priority for bitcoin as /bin/bitcoin_test will
# confilict with /bin/bitcoin_test from elementsd.
bitcoin = (pkgs.bitcoin.overrideAttrs (attrs: {
meta = attrs.meta or {} // {
priority = 0;
};
}));
# Build a clightning version with developer features enabled.
# Clightning is way more responsive with dev features.
clightning-dev = (pkgs.clightning.overrideDerivation (attrs: {
configureFlags = [ "--enable-developer" "--disable-valgrind" ];
pname = "clightning-dev";
postInstall = ''
mv $out/bin/lightningd $out/bin/lightningd-dev
'';
}));
in with pkgs;
{
execs = {
clightning = clightning;
clightning-dev = clightning-dev;
bitcoin = bitcoin;
elements = elementsd;
mermaid = nodePackages.mermaid-cli;
lnd = lndemergencypkgs.lnd;
};
testpkgs = [ go bitcoin elementsd clightning-dev lndemergencypkgs.lnd ];
devpkgs = [ bitcoin elementsd clightning clightning-dev lndemergencypkgs.lnd docker-compose jq nodePackages.mermaid-cli ];
}