17 stdenv.mkDerivation (finalAttrs: {
18 pname = "stellar-core";
21 src = fetchFromGitHub {
23 repo = "stellar-core";
24 rev = "v${finalAttrs.version}";
25 hash = "sha256-lxBn/T01Tsa7tid3mRJUigUwv9d3BAPZhV9Mp1lywBU=";
26 fetchSubmodules = true;
30 # Fix gcc-13 build failure due to missing <stdexcept> include
31 # https://github.com/stellar/medida/pull/34
33 name = "gcc-13-p1.patch";
34 url = "https://github.com/stellar/medida/commit/f91354b0055de939779d392999975d611b1b1ad5.patch";
36 extraPrefix = "lib/libmedida/";
37 hash = "sha256-iVeSUY5Rcy62apIKJdbcHGgxAxpQCkygf85oSjbTTXU=";
40 name = "gcc-13-p2.patch";
41 url = "https://github.com/stellar/stellar-core/commit/477b3135281b629554cabaeacfcdbcdc170aa335.patch";
42 hash = "sha256-UVRcAIA5LEaCn16lWfhg19UU7b/apigzTsfPROLZtYg=";
59 propagatedBuildInputs = [
65 enableParallelBuilding = true;
68 # Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
69 # having the .git directory present, so directly provide the version
70 substituteInPlace src/Makefile.am --replace '$$vers' 'stellar-core ${finalAttrs.version}';
72 # Everything needs to be staged in git because the build uses
73 # `git ls-files` to search for source files to compile.
81 description = "Implements the Stellar Consensus Protocol, a federated consensus protocol";
82 homepage = "https://www.stellar.org/";
83 license = lib.licenses.asl20;
85 Stellar-core is the backbone of the Stellar network. It maintains a
86 local copy of the ledger, communicating and staying in sync with other
87 instances of stellar-core on the network. Optionally, stellar-core can
88 store historical records of the ledger and participate in consensus.
91 platforms = lib.platforms.linux;
92 mainProgram = "stellar-core";