summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/blockchains/stellar-core.nix
diff options
context:
space:
mode:
authoraustinbutler <austinbutler@users.noreply.github.com>2021-05-26 21:35:46 +0000
committerGitHub <noreply@github.com>2021-05-26 17:35:46 -0400
commit2a6db4c056b66006804ec39d4185363d1d5f9658 (patch)
treebb5f00044c56bc970c57020cdba1ddde1708a983 /pkgs/applications/blockchains/stellar-core.nix
parent7c0dacb0bd2f838c30b4680b08be75d2992d5467 (diff)
stellar-core: 0.5.1 -> 17.0.0 (#123294)
Diffstat (limited to 'pkgs/applications/blockchains/stellar-core.nix')
-rw-r--r--pkgs/applications/blockchains/stellar-core.nix31
1 files changed, 15 insertions, 16 deletions
diff --git a/pkgs/applications/blockchains/stellar-core.nix b/pkgs/applications/blockchains/stellar-core.nix
index ceb48bf6aa4d..197453599b28 100644
--- a/pkgs/applications/blockchains/stellar-core.nix
+++ b/pkgs/applications/blockchains/stellar-core.nix
@@ -1,31 +1,30 @@
-{ lib, stdenv, fetchgit, autoconf, libtool, automake, pkg-config, git
-, bison, flex, postgresql }:
+{ lib, stdenv, fetchFromGitHub, autoconf, libtool, automake, pkg-config, git
+, bison, flex, postgresql, ripgrep }:
-let
+stdenv.mkDerivation rec {
pname = "stellar-core";
- version = "0.5.1";
+ version = "17.0.0";
-in stdenv.mkDerivation {
- name = "${pname}-${version}";
-
- src = fetchgit {
- url = "https://github.com/stellar/stellar-core.git";
- rev = "refs/tags/v${version}";
- sha256 = "0ldw3qr0sajgam38z2w2iym0214ial6iahbzx3b965cw92n8n88z";
+ src = fetchFromGitHub {
+ owner = "stellar";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "1ngl8yjqb8xzhdwzlxzzxf14q2hgwy2ysb17sn5380rrn0jswin1";
fetchSubmodules = true;
- leaveDotGit = true;
};
- nativeBuildInputs = [ pkg-config ];
- buildInputs = [ autoconf automake libtool git ];
+ nativeBuildInputs = [ automake autoconf git libtool pkg-config ripgrep ];
propagatedBuildInputs = [ bison flex postgresql ];
- patches = [ ./stellar-core-dirty-version.patch ];
-
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
# `git ls-files` to search for source files to compile.
+ git init
git add .
./autogen.sh