summaryrefslogtreecommitdiffstats
path: root/pkgs/servers/confluent-platform
diff options
context:
space:
mode:
authorPol Dellaiera <pol.dellaiera@protonmail.com>2023-08-06 19:38:19 +0200
committerPol Dellaiera <pol.dellaiera@protonmail.com>2023-08-06 19:38:19 +0200
commit62145b62ef946b8468f82d66b4ca00c37d76bf7b (patch)
tree408f4de3c3d06c30a2ac4079e131e8f4a699d5d0 /pkgs/servers/confluent-platform
parent62de78c64521ff6d6e2e76dcaa0616366efd9d93 (diff)
confluent-platform: use `finalAttrs` pattern
Diffstat (limited to 'pkgs/servers/confluent-platform')
-rw-r--r--pkgs/servers/confluent-platform/default.nix45
1 files changed, 31 insertions, 14 deletions
diff --git a/pkgs/servers/confluent-platform/default.nix b/pkgs/servers/confluent-platform/default.nix
index c7703f5c0d0a..3f77c88b19c3 100644
--- a/pkgs/servers/confluent-platform/default.nix
+++ b/pkgs/servers/confluent-platform/default.nix
@@ -1,19 +1,34 @@
-{ stdenv, lib, fetchurl, fetchFromGitHub
-, jre, makeWrapper, bash, gnused }:
-
-stdenv.mkDerivation rec {
+{
+ bash
+, fetchurl
+, gnused
+, jre
+, lib
+, makeBinaryWrapper
+, stdenv
+}:
+
+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;
};
-}
+})