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:
parent
093b2de396
commit
5ee75e236c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue