mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
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
|
, leveldb, glog, perf, utillinux, libnl, iproute, openssl, libevent
|
||||||
, ethtool, coreutils, which, iptables, maven
|
, ethtool, coreutils, which, iptables, maven
|
||||||
, bash, autoreconfHook
|
, bash, autoreconfHook
|
||||||
|
, withJava ? !stdenv.isDarwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -46,11 +47,13 @@ in stdenv.mkDerivation rec {
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
];
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
makeWrapper curl sasl jdk
|
makeWrapper curl sasl
|
||||||
python wrapPython boto setuptools leveldb
|
python wrapPython boto setuptools leveldb
|
||||||
subversion apr glog openssl libevent maven
|
subversion apr glog openssl libevent
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
libnl
|
libnl
|
||||||
|
] ++ lib.optionals withJava [
|
||||||
|
jdk maven
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -181,6 +184,7 @@ in stdenv.mkDerivation rec {
|
||||||
"--with-libevent=${libevent.dev}"
|
"--with-libevent=${libevent.dev}"
|
||||||
"--with-protobuf=${pythonProtobuf.protobuf}"
|
"--with-protobuf=${pythonProtobuf.protobuf}"
|
||||||
"PROTOBUF_JAR=${mavenRepo}/com/google/protobuf/protobuf-java/3.3.0/protobuf-java-3.3.0.jar"
|
"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 [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
"--with-network-isolator"
|
"--with-network-isolator"
|
||||||
"--with-nl=${libnl.dev}"
|
"--with-nl=${libnl.dev}"
|
||||||
|
@ -190,16 +194,6 @@ in stdenv.mkDerivation rec {
|
||||||
rm -rf $out/var
|
rm -rf $out/var
|
||||||
rm $out/bin/*.sh
|
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
|
# Inspired by: pkgs/development/python-modules/generic/default.nix
|
||||||
pushd src/python
|
pushd src/python
|
||||||
mkdir -p $out/lib/${python.libPrefix}/site-packages
|
mkdir -p $out/lib/${python.libPrefix}/site-packages
|
||||||
|
@ -218,6 +212,16 @@ in stdenv.mkDerivation rec {
|
||||||
--old-and-unmanageable \
|
--old-and-unmanageable \
|
||||||
--prefix="$out"
|
--prefix="$out"
|
||||||
popd
|
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 = ''
|
postFixup = ''
|
||||||
|
@ -248,6 +252,6 @@ in stdenv.mkDerivation rec {
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
description = "A cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks";
|
description = "A cluster manager that provides efficient resource isolation and sharing across distributed applications, or frameworks";
|
||||||
maintainers = with maintainers; [ cstrahan kevincox offline ];
|
maintainers = with maintainers; [ cstrahan kevincox offline ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,12 @@ stdenv.mkDerivation rec {
|
||||||
make all leveldbutil libmemenv.a
|
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}
|
mkdir -p $out/{bin,lib,include}
|
||||||
|
|
||||||
cp -r include $out
|
cp -r include $out
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, findutils
|
{ stdenv, fetchurl, findutils, fixDarwinDylibNames
|
||||||
, sslSupport? true, openssl
|
, sslSupport? true, openssl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = []
|
buildInputs = []
|
||||||
++ stdenv.lib.optional sslSupport openssl
|
++ stdenv.lib.optional sslSupport openssl
|
||||||
++ stdenv.lib.optional stdenv.isCygwin findutils
|
++ stdenv.lib.optional stdenv.isCygwin findutils
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames
|
||||||
;
|
;
|
||||||
|
|
||||||
postInstall = stdenv.lib.optionalString sslSupport ''
|
postInstall = stdenv.lib.optionalString sslSupport ''
|
||||||
|
|
Loading…
Reference in a new issue