Merge pull request #38468 from veprbl/mesos_darwin
mesos: fix on darwin by disabling java interface
This commit is contained in:
commit
92a36cf63b
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -15,7 +15,12 @@ stdenv.mkDerivation rec {
|
||||
make all leveldbutil libmemenv.a
|
||||
'';
|
||||
|
||||
installPhase = "
|
||||
installPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
for file in *.dylib*; do
|
||||
install_name_tool -id $out/lib/$file $file
|
||||
done
|
||||
'') + # XXX consider removing above after transition to cmake in the next release
|
||||
"
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
|
||||
cp -r include $out
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, findutils
|
||||
{ stdenv, fetchurl, findutils, fixDarwinDylibNames
|
||||
, sslSupport? true, openssl
|
||||
}:
|
||||
|
||||
@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = []
|
||||
++ stdenv.lib.optional sslSupport openssl
|
||||
++ stdenv.lib.optional stdenv.isCygwin findutils
|
||||
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames
|
||||
;
|
||||
|
||||
postInstall = stdenv.lib.optionalString sslSupport ''
|
||||
|
Loading…
Reference in New Issue
Block a user