2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-25 13:55:36 +00:00
|
|
|
, fetchurl
|
|
|
|
, autoreconfHook
|
|
|
|
, jre
|
|
|
|
, openssl
|
|
|
|
, pkg-config
|
|
|
|
# We depend on ZooKeeper for the Jute compiler.
|
|
|
|
, zookeeper
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "zookeeper_mt";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = lib.getVersion zookeeper;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha512 = "sha512-ttYbATvfe+uRYhQWfeG1WGXl5GOztcrITfl/4EQierAzSaDvTmVxSb582hYQOdBpxw2QrVbIdnTm3/Xt4ifecg==";
|
2020-12-25 13:55:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
2021-04-26 19:14:03 +00:00
|
|
|
pkg-config
|
2020-12-25 13:55:36 +00:00
|
|
|
jre
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
zookeeper
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +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 ..
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
configureFlags = [
|
|
|
|
# We're not going to start test servers in the sandbox anyway.
|
|
|
|
"--without-cppunit"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-25 13:55:36 +00:00
|
|
|
homepage = "https://zookeeper.apache.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Apache Zookeeper";
|
|
|
|
license = licenses.asl20;
|
2020-12-25 13:55:36 +00:00
|
|
|
maintainers = with maintainers; [ commandodev ztzg ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|