rippled: initial pkg and module expressions

rippled is the Ripple P2P payment network reference server
https://ripple.com
This commit is contained in:
Emery Hemingway
2014-03-29 15:31:37 -04:00
parent 22c04a2fe1
commit 6c77690b28
7 changed files with 409 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
{ stdenv, fetchurl, scons, pkgconfig, openssl, protobuf, boost155, zlib}:
stdenv.mkDerivation rec {
name = "rippled-${version}";
version = "0.23.0";
src = fetchurl {
url = "https://github.com/ripple/rippled/archive/${version}.tar.gz";
sha256 = "0js734sk11jn19fyp403mk6p62azlc6s9kyhr5jfg466fiak537p";
};
patches = [ ./scons-env.patch ];
buildInputs = [ scons pkgconfig openssl protobuf boost155 zlib ];
RIPPLED_BOOST_HOME = boost155.out;
RIPPLED_ZLIB_HOME = zlib.out;
buildPhase = "scons build/rippled";
installPhase = ''
mkdir -p $out/bin
cp build/rippled $out/bin/
'';
meta = {
description = "Ripple P2P payment network reference server";
homepage = "https://ripple.com";
maintainers = stdenv.lib.maintainers.emery;
license = stdenv.lib.licenses.isc;
platforms = stdenv.lib.platforms.linux;
};
}
+46
View File
@@ -0,0 +1,46 @@
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 = [