2021-01-21 11:10:41 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, autogen
|
|
|
|
, gettext
|
|
|
|
, libtool
|
|
|
|
, pkg-config
|
|
|
|
, unzip
|
|
|
|
, which
|
|
|
|
, gmp
|
2021-01-25 19:23:58 +01:00
|
|
|
, libsodium
|
2021-01-21 11:10:41 +01:00
|
|
|
, python3
|
|
|
|
, sqlite
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
py3 = python3.withPackages (p: [ p.Mako ]);
|
|
|
|
in
|
2018-06-21 04:48:12 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "clightning";
|
2021-01-21 11:10:41 +01:00
|
|
|
version = "0.9.3";
|
2019-03-04 13:21:56 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
|
2021-01-21 11:10:41 +01:00
|
|
|
sha256 = "b4563921ed8bccd59d32b031f81825dc57fbe90882f0ecd5da89e48b59ff18b2";
|
2018-06-21 04:48:12 +02:00
|
|
|
};
|
|
|
|
|
2021-01-21 11:10:41 +01:00
|
|
|
nativeBuildInputs = [ autogen autoconf automake gettext libtool pkg-config py3 unzip which ];
|
2018-06-21 04:48:12 +02:00
|
|
|
|
2021-01-25 19:23:58 +01:00
|
|
|
buildInputs = [ gmp libsodium sqlite zlib ];
|
2018-06-21 04:48:12 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
2019-08-30 14:34:39 +02:00
|
|
|
patchShebangs \
|
|
|
|
tools/generate-wire.py \
|
|
|
|
tools/update-mocks.sh \
|
2019-10-29 08:52:43 +01:00
|
|
|
tools/mockup.sh \
|
|
|
|
devtools/sql-rewrite.py
|
2018-06-21 04:48:12 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-21 11:10:41 +01:00
|
|
|
configurePhase = ''
|
|
|
|
./configure --prefix=$out --disable-developer --disable-valgrind
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags = [ "prefix=$(out) VERSION=v${version}" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2018-06-21 04:48:12 +02:00
|
|
|
|
2021-01-21 11:10:41 +01:00
|
|
|
meta = with lib; {
|
2018-06-21 04:48:12 +02:00
|
|
|
description = "A Bitcoin Lightning Network implementation in C";
|
2021-01-21 11:10:41 +01:00
|
|
|
longDescription = ''
|
2018-06-21 04:48:12 +02: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 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ElementsProject/lightning";
|
2021-01-21 11:10:41 +01:00
|
|
|
maintainers = with maintainers; [ jb55 prusnak ];
|
2018-06-21 04:48:12 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|