2021-05-26 22:35:46 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
|
|
|
|
, bison, flex, postgresql, ripgrep }:
|
2017-01-03 06:41:23 +00:00
|
|
|
|
2021-05-26 22:35:46 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-01-03 06:41:23 +00:00
|
|
|
pname = "stellar-core";
|
2021-05-26 22:35:46 +01:00
|
|
|
version = "17.0.0";
|
2017-01-03 06:41:23 +00:00
|
|
|
|
2021-05-26 22:35:46 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stellar";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1ngl8yjqb8xzhdwzlxzzxf14q2hgwy2ysb17sn5380rrn0jswin1";
|
2017-01-03 06:41:23 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-05-26 22:35:46 +01:00
|
|
|
nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep ];
|
2017-01-03 06:41:23 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ bison flex postgresql ];
|
|
|
|
|
|
|
|
preConfigure = ''
|
2021-05-26 22:35:46 +01:00
|
|
|
# Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
|
|
|
|
# having the .git directory present, so directly provide the version
|
|
|
|
substituteInPlace src/Makefile.am --replace '$$vers' '${pname} ${version}';
|
|
|
|
|
2017-01-03 06:41:23 +00:00
|
|
|
# Everything needs to be staged in git because the build uses
|
|
|
|
# `git ls-files` to search for source files to compile.
|
2021-05-26 22:35:46 +01:00
|
|
|
git init
|
2017-01-03 06:41:23 +00:00
|
|
|
git add .
|
|
|
|
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-01-03 06:41:23 +00:00
|
|
|
description = "Implements the Stellar Consensus Protocol, a federated consensus protocol";
|
|
|
|
longDescription = ''
|
|
|
|
Stellar-core is the backbone of the Stellar network. It maintains a
|
|
|
|
local copy of the ledger, communicating and staying in sync with other
|
|
|
|
instances of stellar-core on the network. Optionally, stellar-core can
|
|
|
|
store historical records of the ledger and participate in consensus.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.stellar.org/";
|
2017-01-15 13:02:05 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2021-06-06 09:37:32 +01:00
|
|
|
maintainers = with maintainers; [ ];
|
2017-01-03 06:41:23 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|