2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-11-23 19:42:06 +00:00
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, jre
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
# We depend on ZooKeeper for the Jute compiler.
|
|
|
|
, zookeeper
|
|
|
|
}:
|
2015-02-03 08:47:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-23 19:42:06 +00:00
|
|
|
pname = "zookeeper_mt";
|
2021-01-21 17:00:13 +00:00
|
|
|
version = lib.getVersion zookeeper;
|
2015-02-03 08:47:26 +00:00
|
|
|
|
2020-11-23 19:42:06 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
|
2021-04-24 11:07:34 +01:00
|
|
|
sha512 = "90643aa0ae1b9bf1f5e137dfbcee7e3c53db15e5038d7e406e4a1c345d6a0531bf7afa2b03f99d419ebd0fe892f127a7abfe582f786034ba823e53a0a9246bfb";
|
2020-11-23 19:42:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-04-24 11:07:34 +01:00
|
|
|
pkg-config
|
2020-11-23 19:42:06 +00:00
|
|
|
jre
|
|
|
|
];
|
2015-02-03 08:47:26 +00:00
|
|
|
|
2020-11-23 19:42:06 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
zookeeper
|
|
|
|
];
|
2019-01-11 05:18:49 +00:00
|
|
|
|
2020-11-23 19:42:06 +00:00
|
|
|
# Generate the C marshallers/unmarshallers for the Jute-encoded
|
|
|
|
# definitions.
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir generated
|
|
|
|
cd generated
|
|
|
|
java -cp ${zookeeper}/lib/${zookeeper.pname}-jute-${version}.jar \
|
|
|
|
org.apache.jute.compiler.generated.Rcc -l c \
|
|
|
|
../../../zookeeper-jute/src/main/resources/zookeeper.jute
|
|
|
|
cd ..
|
|
|
|
'';
|
2015-02-03 08:47:26 +00:00
|
|
|
|
2020-11-23 19:42:06 +00:00
|
|
|
configureFlags = [
|
|
|
|
# We're not going to start test servers in the sandbox anyway.
|
|
|
|
"--without-cppunit"
|
|
|
|
];
|
2019-01-11 05:18:49 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-11-23 19:42:06 +00:00
|
|
|
homepage = "https://zookeeper.apache.org";
|
2019-01-11 05:18:49 +00:00
|
|
|
description = "Apache Zookeeper";
|
|
|
|
license = licenses.asl20;
|
2020-11-23 19:42:06 +00:00
|
|
|
maintainers = with maintainers; [ commandodev ztzg ];
|
2019-01-11 05:18:49 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|