1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-19 20:21:14 +00:00

apache-kafka: Enable overriding the kafka package

This commit is contained in:
Shea Levy 2015-06-12 15:56:06 -04:00
parent 093b2de396
commit 5ee75e236c

View file

@ -116,11 +116,19 @@ in {
];
};
package = mkOption {
description = "The kafka package to use";
default = pkgs.apacheKafka;
type = types.package;
};
};
config = mkIf cfg.enable {
environment.systemPackages = [pkgs.apacheKafka];
environment.systemPackages = [cfg.package];
users.extraUsers = singleton {
name = "apache-kafka";
@ -136,7 +144,7 @@ in {
serviceConfig = {
ExecStart = ''
${pkgs.jre}/bin/java \
-cp "${pkgs.apacheKafka}/libs/*:${configDir}" \
-cp "${cfg.package}/libs/*:${configDir}" \
${toString cfg.jvmOptions} \
kafka.Kafka \
${configDir}/server.properties