stellar-core: 0.5.1 -> 17.0.0 (#123294)

This commit is contained in:
austinbutler 2021-05-26 21:35:46 +00:00 committed by GitHub
parent 7c0dacb0bd
commit 2a6db4c056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 31 deletions

View File

@ -1,15 +0,0 @@
Subject: Prevent "-dirty" from being erroneously added to the version
diff --git a/src/Makefile.am b/src/Makefile.am
index d36d1a3..00048fc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,7 +28,7 @@ always:
# Always rebuild because .git/HEAD is a symbolic ref one can't depend on
StellarCoreVersion.h: always
@vers=$$(cd "$(srcdir)" \
- && git describe --always --dirty --tags 2>/dev/null \
+ && git describe --always --tags 2>/dev/null \
|| echo "$(PACKAGE) $(VERSION)"); \
echo "#define STELLAR_CORE_VERSION \"$$vers\"" > $@~
@if cmp -s $@~ $@; then rm -f $@~; else \

View File

@ -1,31 +1,30 @@
{ lib, stdenv, fetchgit, autoconf, libtool, automake, pkg-config, git { lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
, bison, flex, postgresql }: , bison, flex, postgresql, ripgrep }:
let stdenv.mkDerivation rec {
pname = "stellar-core"; pname = "stellar-core";
version = "0.5.1"; version = "17.0.0";
in stdenv.mkDerivation { src = fetchFromGitHub {
name = "${pname}-${version}"; owner = "stellar";
repo = pname;
src = fetchgit { rev = "v${version}";
url = "https://github.com/stellar/stellar-core.git"; sha256 = "1ngl8yjqb8xzhdwzlxzzxf14q2hgwy2ysb17sn5380rrn0jswin1";
rev = "refs/tags/v${version}";
sha256 = "0ldw3qr0sajgam38z2w2iym0214ial6iahbzx3b965cw92n8n88z";
fetchSubmodules = true; fetchSubmodules = true;
leaveDotGit = true;
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep ];
buildInputs = [ autoconf automake libtool git ];
propagatedBuildInputs = [ bison flex postgresql ]; propagatedBuildInputs = [ bison flex postgresql ];
patches = [ ./stellar-core-dirty-version.patch ];
preConfigure = '' preConfigure = ''
# 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}';
# Everything needs to be staged in git because the build uses # Everything needs to be staged in git because the build uses
# `git ls-files` to search for source files to compile. # `git ls-files` to search for source files to compile.
git init
git add . git add .
./autogen.sh ./autogen.sh