summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorKevin Cox <kevincox@kevincox.ca>2016-01-23 09:49:19 -0500
committerKevin Cox <kevincox@kevincox.ca>2016-02-14 08:22:47 -0500
commitd5ed1637b6259d394cd35fc7a1b97807abd843e2 (patch)
tree52286466cb9f0d2791c4568e69816c83bccf0d2c /pkgs/applications/networking
parentaa31d99d2929eeb1082eb8bc05cc0ebbe49c9a09 (diff)
downloadnixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar.gz
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar.bz2
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar.lz
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar.xz
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.tar.zst
nixlib-d5ed1637b6259d394cd35fc7a1b97807abd843e2.zip
mesos: 0.23.0 -> 0.26.0
Update mesos to 0.26.0 and build with SSL support.
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/mesos/default.nix42
-rw-r--r--pkgs/applications/networking/cluster/mesos/maven_repo.patch13
2 files changed, 41 insertions, 14 deletions
diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix
index cb6be73ec9bf..25bd659d63af 100644
--- a/pkgs/applications/networking/cluster/mesos/default.nix
+++ b/pkgs/applications/networking/cluster/mesos/default.nix
@@ -1,7 +1,7 @@
 { stdenv, lib, makeWrapper, fetchurl, curl, sasl, openssh, autoconf
-, automake114x, libtool, unzip, gnutar, jdk, maven, python, wrapPython
-, setuptools, boto, pythonProtobuf, apr, subversion
-, leveldb, glog, perf, utillinux, libnl, iproute
+, automake115x, libtool, unzip, gnutar, jdk, maven, python, wrapPython
+, setuptools, boto, pythonProtobuf, apr, subversion, gzip
+, leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent
 }:
 
 let
@@ -9,25 +9,26 @@ let
   soext = if stdenv.system == "x86_64-darwin" then "dylib" else "so";
 
 in stdenv.mkDerivation rec {
-  version = "0.23.0";
+  version = "0.26.0";
   name = "mesos-${version}";
 
   dontDisableStatic = true;
 
   src = fetchurl {
     url = "mirror://apache/mesos/${version}/${name}.tar.gz";
-    sha256 = "1v5xpn4wal4vcrvcklchx9slkpa8xlwqkdbnxzy9zkzpq5g3arxr";
+    sha256 = "0csvaql9gky15w23gmiw6cvlfnrlhfxvdqd2pv3j3grr44ph0ab5";
   };
 
   patches = [
     # https://reviews.apache.org/r/36610/
     ./rb36610.patch
+    ./maven_repo.patch
   ];
 
   buildInputs = [
-    makeWrapper autoconf automake114x libtool curl sasl jdk maven
+    makeWrapper autoconf automake115x libtool curl sasl jdk maven
     python wrapPython boto setuptools leveldb
-    subversion apr glog
+    subversion apr glog openssl libevent
   ] ++ lib.optionals stdenv.isLinux [
     libnl
   ];
@@ -37,17 +38,18 @@ in stdenv.mkDerivation rec {
   ];
 
   preConfigure = ''
-    export MAVEN_OPTS="-Dmaven.repo.local=${mavenRepo}"
+    substituteInPlace src/Makefile.am --subst-var-by mavenRepo ${mavenRepo}
 
     substituteInPlace src/launcher/fetcher.cpp \
+      --replace '"gzip' '"${gzip}/bin/gzip'    \
       --replace '"tar' '"${gnutar}/bin/tar'    \
       --replace '"unzip' '"${unzip}/bin/unzip'
 
     substituteInPlace src/cli/mesos-scp        \
       --replace "'scp " "'${openssh}/bin/scp "
 
-    substituteInPlace src/cli/python/mesos/cli.py \
-      --replace "['mesos-resolve'" "['$out/bin/mesos-resolve'"
+    substituteInPlace src/python/cli/src/mesos/cli.py \
+     --replace "['mesos-resolve'" "['$out/bin/mesos-resolve'"
 
   '' + lib.optionalString (stdenv.isLinux) ''
 
@@ -57,13 +59,13 @@ in stdenv.mkDerivation rec {
     substituteInPlace src/linux/perf.cpp       \
       --replace '"perf ' '"${perf}/bin/perf '
 
-    substituteInPlace src/slave/containerizer/isolators/filesystem/shared.cpp \
+    substituteInPlace src/slave/containerizer/mesos/isolators/filesystem/shared.cpp \
       --replace '"mount ' '"${utillinux}/bin/mount ' \
 
-    substituteInPlace src/slave/containerizer/isolators/namespaces/pid.cpp \
+    substituteInPlace src/slave/containerizer/mesos/isolators/namespaces/pid.cpp \
       --replace '"mount ' '"${utillinux}/bin/mount ' \
 
-    substituteInPlace src/slave/containerizer/isolators/network/port_mapping.cpp \
+    substituteInPlace src/slave/containerizer/mesos/isolators/network/port_mapping.cpp \
       --replace '"tc ' '"${iproute}/bin/tc '   \
       --replace '"ip ' '"${iproute}/bin/ip '   \
       --replace '"mount ' '"${utillinux}/bin/mount ' \
@@ -79,6 +81,10 @@ in stdenv.mkDerivation rec {
     "--with-glog=${glog}"
     "--enable-optimize"
     "--disable-python-dependency-install"
+    "--enable-ssl"
+    "--with-ssl=${openssl}"
+    "--enable-libevent"
+    "--with-libevent=${libevent}"
   ] ++ lib.optionals stdenv.isLinux [
     "--with-network-isolator"
   ];
@@ -107,6 +113,14 @@ in stdenv.mkDerivation rec {
       --prefix="$out"
     rm -f "$out/lib/${python.libPrefix}"/site-packages/site.py*
     popd
+
+    # optional python dependency for mesos cli 
+    pushd src/python/cli
+    ${python}/bin/${python.executable} setup.py install \
+      --install-lib=$out/lib/${python.libPrefix}/site-packages \
+      --old-and-unmanageable \
+      --prefix="$out"
+    popd
   '';
 
   postFixup = ''
@@ -127,7 +141,7 @@ in stdenv.mkDerivation rec {
     # wrap the python programs
     for prog in mesos-cat mesos-ps mesos-scp mesos-tail; do
       wrapProgram "$out/bin/$prog" \
-        --prefix PYTHONPATH ":" "$out/libexec/mesos/python"
+        --prefix PYTHONPATH ":" "$out/lib/${python.libPrefix}/site-packages"
       true
     done
   '';
diff --git a/pkgs/applications/networking/cluster/mesos/maven_repo.patch b/pkgs/applications/networking/cluster/mesos/maven_repo.patch
new file mode 100644
index 000000000000..9ee12976fde1
--- /dev/null
+++ b/pkgs/applications/networking/cluster/mesos/maven_repo.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index ae2740a..1df91a7 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1310,7 +1310,7 @@ if HAS_JAVA
+ 
+ $(MESOS_JAR): $(MESOS_JAR_SOURCE) $(MESOS_JAR_GENERATED) java/mesos.pom
+ 	@echo "Building mesos-$(PACKAGE_VERSION).jar ..."
+-	@cd $(abs_top_builddir)/src/java && $(MVN) -f mesos.pom clean package
++	@cd $(abs_top_builddir)/src/java && $(MVN) -f mesos.pom -Dmaven.repo.local=@mavenRepo@ clean package
+ 
+ # Convenience library for JNI bindings.
+ # TODO(Charles Reiss): We really should be building the Java library