confluent-platform: use finalAttrs pattern

This commit is contained in:
Pol Dellaiera 2023-08-06 19:38:19 +02:00
parent 62de78c645
commit 62145b62ef
No known key found for this signature in database
GPG key ID: D476DFE9C67467CA

View file

@ -1,19 +1,34 @@
{ stdenv, lib, fetchurl, fetchFromGitHub
, jre, makeWrapper, bash, gnused }:
{
bash
, fetchurl
, gnused
, jre
, lib
, makeBinaryWrapper
, stdenv
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "confluent-platform";
version = "7.4.1";
src = fetchurl {
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor version}/confluent-${version}.tar.gz";
sha256 = "sha256-dJwG+QRplXX7etxG/e1kzcRMJppF6TYofio8FO1p+aI=";
url = "https://packages.confluent.io/archive/${lib.versions.majorMinor finalAttrs.version}/confluent-${finalAttrs.version}.tar.gz";
hash = "sha256-dJwG+QRplXX7etxG/e1kzcRMJppF6TYofio8FO1p+aI=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre bash ];
nativeBuildInputs = [
makeBinaryWrapper
];
buildInputs = [
bash
jre
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -R bin etc share src $out
rm -rf $out/bin/windows
@ -33,13 +48,15 @@ stdenv.mkDerivation rec {
--set KAFKA_LOG_DIR "/tmp/apache-kafka-logs" \
--prefix PATH : "${jre}/bin:${bash}/bin:${gnused}/bin"
done
runHook postInstall
'';
meta = with lib; {
homepage = "https://www.confluent.io/";
meta = {
description = "Confluent event streaming platform based on Apache Kafka";
license = licenses.asl20;
maintainers = with maintainers; [ zoedsoupe ];
platforms = platforms.unix;
homepage = "https://www.confluent.io/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ zoedsoupe ];
platforms = lib.platforms.unix;
};
}
})