summary refs log tree commit diff
path: root/pkgs/servers/rippled
diff options
context:
space:
mode:
authorEmery Hemingway <emery@vfemail.net>2014-03-26 18:12:00 -0400
committerEmery Hemingway <emery@vfemail.net>2014-03-29 15:31:37 -0400
commit6c77690b2898aa8a12184ca8f3c113a11c957e50 (patch)
treecfee74fab8daa89079e3787367ae44dc07da01f7 /pkgs/servers/rippled
parent22c04a2fe121edfdc7950fea293c0ed2eea769e7 (diff)
downloadnixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar.gz
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar.bz2
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar.lz
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar.xz
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.tar.zst
nixlib-6c77690b2898aa8a12184ca8f3c113a11c957e50.zip
rippled: initial pkg and module expressions
rippled is the Ripple P2P payment network reference server
https://ripple.com
Diffstat (limited to 'pkgs/servers/rippled')
-rw-r--r--pkgs/servers/rippled/default.nix32
-rw-r--r--pkgs/servers/rippled/scons-env.patch46
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix
new file mode 100644
index 000000000000..66a0743b367f
--- /dev/null
+++ b/pkgs/servers/rippled/default.nix
@@ -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;
+  };
+}
\ No newline at end of file
diff --git a/pkgs/servers/rippled/scons-env.patch b/pkgs/servers/rippled/scons-env.patch
new file mode 100644
index 000000000000..5b80e77bb2e0
--- /dev/null
+++ b/pkgs/servers/rippled/scons-env.patch
@@ -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 = [