rippled: Refactor and update to 0.26.2
This commit is contained in:
parent
47ef7b4508
commit
3aa7f22228
|
@ -1,20 +1,22 @@
|
|||
{ stdenv, fetchurl, scons, pkgconfig, openssl, protobuf, boost, zlib}:
|
||||
{ stdenv, fetchFromGitHub, scons, pkgconfig, openssl, protobuf, boost, zlib}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "rippled-${version}";
|
||||
version = "0.23.0";
|
||||
version = "0.26.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ripple/rippled/archive/${version}.tar.gz";
|
||||
sha256 = "0js734sk11jn19fyp403mk6p62azlc6s9kyhr5jfg466fiak537p";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ripple";
|
||||
repo = "rippled";
|
||||
rev = "0.26.2";
|
||||
sha256 = "06hcc3nnzp9f6j00890f41rrn4djwlcwkzmqnw4yra74sswgji5y";
|
||||
};
|
||||
|
||||
patches = [ ./scons-env.patch ];
|
||||
postPatch = ''
|
||||
sed -i -e "s@ENV = dict.*@ENV = os.environ@g" SConstruct
|
||||
'';
|
||||
|
||||
buildInputs = [ scons pkgconfig openssl protobuf boost zlib ];
|
||||
|
||||
RIPPLED_BOOST_HOME = boost.out;
|
||||
RIPPLED_ZLIB_HOME = zlib.out;
|
||||
buildPhase = "scons build/rippled";
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
diff --git a/SConstruct b/SConstruct
|
||||
index 8ba8bbd..95eab3b 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -24,6 +24,8 @@ USING_CLANG = OSX or os.environ.get('CC', None) == 'clang'
|
||||
#
|
||||
BOOST_HOME = os.environ.get("RIPPLED_BOOST_HOME", None)
|
||||
|
||||
+ZLIB_HOME = os.environ.get("RIPPLED_ZLIB_HOME", None)
|
||||
+
|
||||
|
||||
if OSX or Ubuntu or Debian or Archlinux:
|
||||
CTAGS = 'ctags'
|
||||
@@ -36,7 +38,7 @@ else:
|
||||
# scons tools
|
||||
#
|
||||
|
||||
-HONOR_ENVS = ['CC', 'CXX', 'PATH']
|
||||
+HONOR_ENVS = ['CC', 'CXX', 'PATH', 'PKG_CONFIG_PATH']
|
||||
|
||||
env = Environment(
|
||||
tools = ['default', 'protoc'],
|
||||
@@ -156,8 +158,8 @@ INCLUDE_PATHS = [
|
||||
'build/proto'
|
||||
]
|
||||
|
||||
-# if BOOST_HOME:
|
||||
-# INCLUDE_PATHS.append(BOOST_HOME)
|
||||
+if BOOST_HOME:
|
||||
+ INCLUDE_PATHS.append("%s/include" % BOOST_HOME)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
@@ -261,7 +263,11 @@ env.Append(
|
||||
# such, as installed into `/usr/lib/`
|
||||
if BOOST_HOME is not None:
|
||||
env.Prepend(
|
||||
- LIBPATH = ["%s/stage/lib" % BOOST_HOME])
|
||||
+ LIBPATH = ["%s/lib" % BOOST_HOME])
|
||||
+
|
||||
+if ZLIB_HOME is not None:
|
||||
+ env.Prepend(
|
||||
+ LIBPATH = ["%s/lib" % ZLIB_HOME])
|
||||
|
||||
if not OSX:
|
||||
env.Append(LINKFLAGS = [
|
Loading…
Reference in New Issue