Merge pull request #197865 from srhb/unbreak-kafka

Unbreak kafka

authored by Thiago Kenji Okada and committed by GitHub 06ccee0e 72e5ea81

+6 -10
+2 -9
nixos/tests/kafka.nix
··· 50 51 kafka.wait_until_succeeds( 52 "${kafkaPackage}/bin/kafka-topics.sh --create " 53 - + "--zookeeper zookeeper1:2181 --partitions 1 " 54 + "--replication-factor 1 --topic testtopic" 55 ) 56 kafka.succeed( ··· 58 + "${kafkaPackage}/bin/kafka-console-producer.sh " 59 + "--broker-list localhost:9092 --topic testtopic" 60 ) 61 - '' + (if name == "kafka_0_9" then '' 62 - assert "test 1" in kafka.succeed( 63 - "${kafkaPackage}/bin/kafka-console-consumer.sh " 64 - + "--zookeeper zookeeper1:2181 --topic testtopic " 65 - + "--from-beginning --max-messages 1" 66 - ) 67 - '' else '' 68 assert "test 1" in kafka.succeed( 69 "${kafkaPackage}/bin/kafka-console-consumer.sh " 70 + "--bootstrap-server localhost:9092 --topic testtopic " 71 + "--from-beginning --max-messages 1" 72 ) 73 - ''); 74 }) { inherit system; }); 75 76 in with pkgs; {
··· 50 51 kafka.wait_until_succeeds( 52 "${kafkaPackage}/bin/kafka-topics.sh --create " 53 + + "--bootstrap-server localhost:9092 --partitions 1 " 54 + "--replication-factor 1 --topic testtopic" 55 ) 56 kafka.succeed( ··· 58 + "${kafkaPackage}/bin/kafka-console-producer.sh " 59 + "--broker-list localhost:9092 --topic testtopic" 60 ) 61 assert "test 1" in kafka.succeed( 62 "${kafkaPackage}/bin/kafka-console-consumer.sh " 63 + "--bootstrap-server localhost:9092 --topic testtopic " 64 + "--from-beginning --max-messages 1" 65 ) 66 + ''; 67 }) { inherit system; }); 68 69 in with pkgs; {
+4 -1
pkgs/servers/apache-kafka/default.nix
··· 75 chmod +x $out/bin\/* 76 ''; 77 78 meta = with lib; { 79 homepage = "https://kafka.apache.org"; 80 description = "A high-throughput distributed messaging system"; ··· 83 maintainers = [ maintainers.ragge ]; 84 platforms = platforms.unix; 85 }; 86 - passthru = { inherit jdk17_headless; }; 87 }
··· 75 chmod +x $out/bin\/* 76 ''; 77 78 + passthru = { 79 + inherit jre; # Used by the NixOS module to select the supported jre 80 + }; 81 + 82 meta = with lib; { 83 homepage = "https://kafka.apache.org"; 84 description = "A high-throughput distributed messaging system"; ··· 87 maintainers = [ maintainers.ragge ]; 88 platforms = platforms.unix; 89 }; 90 }