From 08c47b7dec8ebc9083588d6425fd261d56523567 Mon Sep 17 00:00:00 2001 From: emaryn Date: Sun, 20 Apr 2025 05:29:07 +0800 Subject: [PATCH] conduktor: 2.15.1 -> 2.24.9 Diff: https://github.com/conduktor/builds/compare/v2.15.1...v2.24.9 Changelog: https://www.conduktor.io/changelog/#2.24.9 --- pkgs/by-name/co/conduktor/package.nix | 65 ++++++++++++++++++--------- 1 file changed, 44 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/co/conduktor/package.nix b/pkgs/by-name/co/conduktor/package.nix index e78f4bd35e22..a84c63fc6789 100644 --- a/pkgs/by-name/co/conduktor/package.nix +++ b/pkgs/by-name/co/conduktor/package.nix @@ -1,38 +1,48 @@ { - stdenv, lib, + stdenv, fetchurl, fetchzip, jdk11, - makeWrapper, + openjfx17, + gtk3, + glib, + pango, + cairo, + gdk-pixbuf, + xorg, + makeBinaryWrapper, makeDesktopItem, copyDesktopItems, }: -stdenv.mkDerivation rec { +let + openjfx_jdk = openjfx17.override { withWebKit = true; }; +in +stdenv.mkDerivation (finalAttrs: { pname = "conduktor"; - version = "2.15.1"; + version = "2.24.9"; src = fetchzip { - url = "https://github.com/conduktor/builds/releases/download/v${version}/Conduktor-linux-${version}.zip"; - sha256 = "sha256-9y/7jni5zIITUWd75AxsfG/b5vCYotmeMeC9aYM2WEs="; + url = "https://github.com/conduktor/builds/releases/download/v${finalAttrs.version}/Conduktor-linux-${finalAttrs.version}.zip"; + hash = "sha256-c9QjlKPZpeJi5YTq4gm+sg7my4EP0LI95AfGguF4ork="; }; nativeBuildInputs = [ - makeWrapper + makeBinaryWrapper copyDesktopItems ]; desktopItems = [ (makeDesktopItem { type = "Application"; - name = pname; + name = "conduktor"; desktopName = "Conduktor"; - genericName = meta.description; - exec = pname; + genericName = finalAttrs.meta.description; + exec = "conduktor"; icon = fetchurl { - url = "https://github.com/conduktor/builds/raw/v${version}/.github/resources/Conduktor.png"; - sha256 = "0s7p74qclvac8xj2m22gfxx5m2c7cf0nqpk5sb049p2wvryhn2j4"; + url = "https://github.com/conduktor/builds/raw/v${finalAttrs.version}/.github/resources/Conduktor.png"; + hash = "sha256-mk4c9ecookRb7gR56cedIWfPfQy2uGF+ZbX6NI90KI0="; }; comment = "A beautiful and fully-featured desktop client for Apache Kafka"; }) @@ -44,23 +54,36 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - mkdir -p $out/share/applications - mv * $out - wrapProgram "$out/bin/conduktor" --set JAVA_HOME "${jdk11.home}" + cp -r . $out + wrapProgram $out/bin/conduktor \ + --set JAVA_HOME ${jdk11.home} \ + --set LD_LIBRARY_PATH ${ + lib.makeLibraryPath [ + openjfx_jdk + gtk3 + gtk3 + glib + pango + cairo + gdk-pixbuf + xorg.libXtst + ] + } \ + --add-flags "--module-path ${openjfx_jdk}/lib --add-modules=javafx.controls,javafx.fxml" runHook postInstall ''; - meta = with lib; { + meta = { description = "Apache Kafka Desktop Client"; longDescription = '' Conduktor is a GUI over the Kafka ecosystem, to make the development and management of Apache Kafka clusters as easy as possible. ''; homepage = "https://www.conduktor.io/"; - changelog = "https://www.conduktor.io/changelog/#${version}"; - license = licenses.unfree; - maintainers = with maintainers; [ trobert ]; - platforms = platforms.linux; + changelog = "https://www.conduktor.io/changelog/#${finalAttrs.version}"; + license = lib.licenses.unfree; + maintainers = with lib.maintainers; [ trobert ]; + platforms = lib.platforms.linux; }; -} +})