lol
1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoreconfHook,
6 jre,
7 openssl,
8 pkg-config,
9 # We depend on ZooKeeper for the Jute compiler.
10 zookeeper,
11}:
12
13stdenv.mkDerivation rec {
14 pname = "zookeeper_mt";
15 version = lib.getVersion zookeeper;
16
17 src = fetchurl {
18 url = "mirror://apache/zookeeper/${zookeeper.pname}-${version}/apache-${zookeeper.pname}-${version}.tar.gz";
19 hash = "sha512-eo/9yeSPbik+5f3g3uc//N0aTx5VS0KCzkA/+wn/FFtAmHwnLex1GZOoOlQwly4KU10Y+pgY1shKab/aigPSFg==";
20 };
21
22 sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
23
24 nativeBuildInputs = [
25 autoreconfHook
26 pkg-config
27 jre
28 ];
29
30 buildInputs = [
31 openssl
32 zookeeper
33 ];
34
35 # Generate the C marshallers/unmarshallers for the Jute-encoded
36 # definitions.
37 preConfigure = ''
38 mkdir generated
39 cd generated
40 java -cp ${zookeeper}/lib/${zookeeper.pname}-jute-${version}.jar \
41 org.apache.jute.compiler.generated.Rcc -l c \
42 ../../../zookeeper-jute/src/main/resources/zookeeper.jute
43 cd ..
44 '';
45
46 configureFlags = [
47 # We're not going to start test servers in the sandbox anyway.
48 "--without-cppunit"
49 ];
50
51 meta = with lib; {
52 homepage = "https://zookeeper.apache.org";
53 description = "Apache Zookeeper";
54 license = licenses.asl20;
55 maintainers = with maintainers; [
56 commandodev
57 ztzg
58 ];
59 platforms = platforms.unix;
60 };
61}