summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-04-05 10:16:20 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-04-05 11:20:31 -0400
commite120915248d2936d9f99ee4498dc29e392891d2a (patch)
treee466d349541af0b5cd65f9ec8929e42060fd2261 /pkgs/applications/networking
parent9049f8a418b1d29f8066baec681684677fce28c7 (diff)
downloadnixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar.gz
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar.bz2
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar.lz
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar.xz
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.tar.zst
nixpkgs-e120915248d2936d9f99ee4498dc29e392891d2a.zip
mesos: fix on darwin by disabling java interface
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/mesos/default.nix30
1 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/applications/networking/cluster/mesos/default.nix b/pkgs/applications/networking/cluster/mesos/default.nix
index 68c66d78de1..961c0afc5c5 100644
--- a/pkgs/applications/networking/cluster/mesos/default.nix
+++ b/pkgs/applications/networking/cluster/mesos/default.nix
@@ -4,6 +4,7 @@
 , leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent
 , ethtool, coreutils, which, iptables, maven
 , bash, autoreconfHook
+, withJava ? !stdenv.isDarwin
 }:
 
 let
@@ -46,11 +47,13 @@ in stdenv.mkDerivation rec {
     autoreconfHook
   ];
   buildInputs = [
-    makeWrapper curl sasl jdk
+    makeWrapper curl sasl
     python wrapPython boto setuptools leveldb
-    subversion apr glog openssl libevent maven
+    subversion apr glog openssl libevent
   ] ++ lib.optionals stdenv.isLinux [
     libnl
+  ] ++ lib.optionals withJava [
+    jdk maven
   ];
 
   propagatedBuildInputs = [
@@ -181,6 +184,7 @@ in stdenv.mkDerivation rec {
     "--with-libevent=${libevent.dev}"
     "--with-protobuf=${pythonProtobuf.protobuf}"
     "PROTOBUF_JAR=${mavenRepo}/com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar"
+    (if withJava then "--enable-java" else "--disable-java")
   ] ++ lib.optionals stdenv.isLinux [
     "--with-network-isolator"
     "--with-nl=${libnl.dev}"
@@ -190,16 +194,6 @@ in stdenv.mkDerivation rec {
     rm -rf $out/var
     rm $out/bin/*.sh
 
-    mkdir -p $out/share/java
-    cp src/java/target/mesos-*.jar $out/share/java
-
-    MESOS_NATIVE_JAVA_LIBRARY=$out/lib/libmesos${stdenv.hostPlatform.extensions.sharedLibrary}
-
-    mkdir -p $out/nix-support
-    touch $out/nix-support/setup-hook
-    echo "export MESOS_NATIVE_JAVA_LIBRARY=$MESOS_NATIVE_JAVA_LIBRARY" >> $out/nix-support/setup-hook
-    echo "export MESOS_NATIVE_LIBRARY=$MESOS_NATIVE_JAVA_LIBRARY" >> $out/nix-support/setup-hook
-
     # Inspired by: pkgs/development/python-modules/generic/default.nix
     pushd src/python
     mkdir -p $out/lib/${python.libPrefix}/site-packages
@@ -218,6 +212,16 @@ in stdenv.mkDerivation rec {
       --old-and-unmanageable \
       --prefix="$out"
     popd
+  '' + stdenv.lib.optionalString withJava ''
+    mkdir -p $out/share/java
+    cp src/java/target/mesos-*.jar $out/share/java
+
+    MESOS_NATIVE_JAVA_LIBRARY=$out/lib/libmesos${stdenv.hostPlatform.extensions.sharedLibrary}
+
+    mkdir -p $out/nix-support
+    touch $out/nix-support/setup-hook
+    echo "export MESOS_NATIVE_JAVA_LIBRARY=$MESOS_NATIVE_JAVA_LIBRARY" >> $out/nix-support/setup-hook
+    echo "export MESOS_NATIVE_LIBRARY=$MESOS_NATIVE_JAVA_LIBRARY" >> $out/nix-support/setup-hook
   '';
 
   postFixup = ''
@@ -248,6 +252,6 @@ in stdenv.mkDerivation rec {
     license     = licenses.asl20;
     description = "A cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks";
     maintainers = with maintainers; [ cstrahan kevincox offline ];
-    platforms   = platforms.linux;
+    platforms   = platforms.unix;
   };
 }