git.iko.soy/typeable/nixpkgs
on master help sign in
stellar-core: 0.5.1 -> 17.0.0 (#123294)
commit2a6db4c056b66006804ec39d4185363d1d5f9658 authoraustinbutler <austinbutler@users.noreply.github.com> dateWed 26 May 2021, 21:35 (5 years ago) parent7c0dacb
2 files changed+15−31
pkgs/applications/blockchains/stellar-core-dirty-version.patch−15 pkgs/applications/blockchains/stellar-core.nix+15−16
pkgs/applications/blockchains/stellar-core-dirty-version.patchdeleted−15
@@ -1,15 +0,0 @@
1−Subject: Prevent "-dirty" from being erroneously added to the version
2−
3−diff --git a/src/Makefile.am b/src/Makefile.am
4−index d36d1a3..00048fc 100644
5−--- a/src/Makefile.am
6−+++ b/src/Makefile.am
7−@@ -28,7 +28,7 @@ always:
8− # Always rebuild because .git/HEAD is a symbolic ref one can't depend on
9− StellarCoreVersion.h: always
10− @vers=$$(cd "$(srcdir)" \
11−- && git describe --always --dirty --tags 2>/dev/null \
12−+ && git describe --always --tags 2>/dev/null \
13− || echo "$(PACKAGE) $(VERSION)"); \
14− echo "#define STELLAR_CORE_VERSION \"$$vers\"" > $@~
15− @if cmp -s $@~ $@; then rm -f $@~; else \
pkgs/applications/blockchains/stellar-core.nix+15−16
@@ -1,31 +1,30 @@
1−{ lib, stdenv, fetchgit, autoconf, libtool, automake, pkg-config, git
2−, bison, flex, postgresql }:
1+{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
2+, bison, flex, postgresql, ripgrep }:
33
4−let
4+stdenv.mkDerivation rec {
55 pname = "stellar-core";
6− version = "0.5.1";
6+ version = "17.0.0";
77
8−in stdenv.mkDerivation {
9− name = "${pname}-${version}";
10−
11− src = fetchgit {
12− url = "https://github.com/stellar/stellar-core.git";
13− rev = "refs/tags/v${version}";
14− sha256 = "0ldw3qr0sajgam38z2w2iym0214ial6iahbzx3b965cw92n8n88z";
8+ src = fetchFromGitHub {
9+ owner = "stellar";
10+ repo = pname;
11+ rev = "v${version}";
12+ sha256 = "1ngl8yjqb8xzhdwzlxzzxf14q2hgwy2ysb17sn5380rrn0jswin1";
1513 fetchSubmodules = true;
16− leaveDotGit = true;
1714 };
1815
19− nativeBuildInputs = [ pkg-config ];
20− buildInputs = [ autoconf automake libtool git ];
16+ nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep ];
2117
2218 propagatedBuildInputs = [ bison flex postgresql ];
2319
24− patches = [ ./stellar-core-dirty-version.patch ];
25−
2620 preConfigure = ''
21+ # Due to https://github.com/NixOS/nixpkgs/issues/8567 we cannot rely on
22+ # having the .git directory present, so directly provide the version
23+ substituteInPlace src/Makefile.am --replace '$$vers' '${pname} ${version}';
24+
2725 # Everything needs to be staged in git because the build uses
2826 # `git ls-files` to search for source files to compile.
27+ git init
2928 git add .
3029
3130 ./autogen.sh