2021-01-21 10:10:41 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, autogen
|
|
|
|
, gettext
|
|
|
|
, libtool
|
|
|
|
, pkg-config
|
|
|
|
, unzip
|
|
|
|
, which
|
|
|
|
, gmp
|
2021-01-25 18:23:58 +00:00
|
|
|
, libsodium
|
2021-01-21 10:10:41 +00:00
|
|
|
, python3
|
|
|
|
, sqlite
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
let
|
2021-11-03 20:56:17 +00:00
|
|
|
py3 = python3.withPackages (p: [ p.Mako p.mrkd ]);
|
2021-01-21 10:10:41 +00:00
|
|
|
in
|
2018-06-21 03:48:12 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "clightning";
|
2021-11-03 20:56:17 +00:00
|
|
|
version = "0.10.2";
|
2019-03-04 12:21:56 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
|
2021-11-03 20:56:17 +00:00
|
|
|
sha256 = "3c9dcb686217b2efe0e988e90b95777c4591e3335e259e01a94af87e0bf01809";
|
2018-06-21 03:48:12 +01:00
|
|
|
};
|
|
|
|
|
2021-01-21 10:10:41 +00:00
|
|
|
nativeBuildInputs = [ autogen autoconf automake gettext libtool pkg-config py3 unzip which ];
|
2018-06-21 03:48:12 +01:00
|
|
|
|
2021-01-25 18:23:58 +00:00
|
|
|
buildInputs = [ gmp libsodium sqlite zlib ];
|
2018-06-21 03:48:12 +01:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-30 13:34:39 +01:00
|
|
|
patchShebangs \
|
|
|
|
tools/generate-wire.py \
|
|
|
|
tools/update-mocks.sh \
|
2019-10-29 07:52:43 +00:00
|
|
|
tools/mockup.sh \
|
|
|
|
devtools/sql-rewrite.py
|
2018-06-21 03:48:12 +01:00
|
|
|
'';
|
|
|
|
|
2021-11-18 17:43:16 +00:00
|
|
|
configureFlags = [ "--disable-developer" "--disable-valgrind" ];
|
2021-01-21 10:10:41 +00:00
|
|
|
|
2021-11-18 17:43:16 +00:00
|
|
|
makeFlags = [ "VERSION=v${version}" ];
|
2021-01-21 10:10:41 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2018-06-21 03:48:12 +01:00
|
|
|
|
2021-01-21 10:10:41 +00:00
|
|
|
meta = with lib; {
|
2018-06-21 03:48:12 +01:00
|
|
|
description = "A Bitcoin Lightning Network implementation in C";
|
2021-01-21 10:10:41 +00:00
|
|
|
longDescription = ''
|
2018-06-21 03:48:12 +01:00
|
|
|
c-lightning is a standard compliant implementation of the Lightning
|
|
|
|
Network protocol. The Lightning Network is a scalability solution for
|
|
|
|
Bitcoin, enabling secure and instant transfer of funds between any two
|
|
|
|
parties for any amount.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ElementsProject/lightning";
|
2021-01-21 10:10:41 +00:00
|
|
|
maintainers = with maintainers; [ jb55 prusnak ];
|
2018-06-21 03:48:12 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|