nixpkgs/pkgs/development/libraries/zookeeper_mt/default.nix

57 lines
1.4 KiB
Nix
Raw Normal View History

2020-11-23 19:42:06 +00:00
{ stdenv
, 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";
version = stdenv.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";
sha512 = "16994067d460a1b6af6a71f3458c64ee32629e876a1ff6646d57be62f1a5adab57462af84074ecaded4186dd3fde035ee24cd9d578b8e5044073eb05f4ab9c3e";
};
sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-client/zookeeper-client-c";
nativeBuildInputs = [
autoreconfHook
jre
];
2015-02-03 08:47:26 +00:00
2020-11-23 19:42:06 +00:00
buildInputs = [
openssl
pkg-config
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
meta = with stdenv.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;
};
}