nixpkgs/pkgs/applications/blockchains/clightning.nix

64 lines
1.5 KiB
Nix
Raw Normal View History

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
py3 = python3.withPackages (p: [ p.Mako ]);
in
stdenv.mkDerivation rec {
pname = "clightning";
2021-03-31 21:50:31 +01:00
version = "0.10.0";
src = fetchurl {
url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip";
2021-03-31 21:50:31 +01:00
sha256 = "5154e67780dddbf12f64c4b1994c3ee3834236f05b6462adf25e8a5f3fa407ea";
};
2021-01-21 10:10:41 +00:00
nativeBuildInputs = [ autogen autoconf automake gettext libtool pkg-config py3 unzip which ];
2021-01-25 18:23:58 +00:00
buildInputs = [ gmp libsodium sqlite zlib ];
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
'';
2021-01-21 10:10:41 +00:00
configurePhase = ''
./configure --prefix=$out --disable-developer --disable-valgrind
'';
makeFlags = [ "prefix=$(out) VERSION=v${version}" ];
enableParallelBuilding = true;
2021-01-21 10:10:41 +00:00
meta = with lib; {
description = "A Bitcoin Lightning Network implementation in C";
2021-01-21 10:10:41 +00:00
longDescription = ''
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.
'';
homepage = "https://github.com/ElementsProject/lightning";
2021-01-21 10:10:41 +00:00
maintainers = with maintainers; [ jb55 prusnak ];
license = licenses.mit;
platforms = platforms.linux;
};
}