I want to build a custom package klassy for my nixos installation. Please help me refine the default.nix file

{ mkDerivation
, lib
, fetchFromGitHub
, cmake
, extra-cmake-modules
, kdecoration
, plasma-workspace
, qt6
, frameworkintegration
, kcmutils
, kcolorscheme
, kconfig
, kcoreaddons
, kguiaddons
, ki18n
, kiconthemes
, kirigami
, kwidgetsaddons
, kwindowsystem
, kcmutils5
, frameworkintegration5
, kconfigwidgets5
, kiconthemes5
, kirigami2
, kwindowsystem5
}:

mkDerivation rec {
  pname = "klassy";
  version = "6.1.breeze6.0.3";

  src = fetchFromGitHub {
    owner = "paulmcauley";
    repo = "klassy";
    rev = "${version}";
    sha256 = "0qkjzgjplgwczhk6959iah4ilvazpprv7yb809jy75kkp1jw8mwk";
  };

  buildInputs = [
    kdecoration
    plasma-workspace
    frameworkintegration
    libgcc
    glibc
    kcmutils
    kcolorscheme 
    kconfig 
    kcoreaddons 
    kguiaddons 
    ki18n 
    kiconthemes 
    kirigami 
    kwidgetsaddons
    kwindowsystem 
    qt6.base
    qt6.declarative 
    qt6.svg
    xdg-utils
    extra-cmake-modules
    kcmutils5
    frameworkintegration5
    kconfigwidgets5
    kiconthemes5
    kirigami2
    kwindowsystem5
  ];

  nativeBuildInputs = [
    cmake
    extra-cmake-modules
  ];

  meta = with lib; {
    description = "A fork of breeze theme style that aims to be visually modern and minimalistic";
    homepage = "https://github.com/paulmcauley/klassy";
    license = licenses.gpl2Plus;
    maintainers = [ maintainers.paulmcauley ];
    platforms = platforms.all;
  };
}

Is there anything specific you are unsure of?

I want to build this one too. Were you able to do it? Do you mind sharing your build configs?

What part are you stuck on?
Packaging existing software with Nix — nix.dev documentation and Package parameters and overrides with callPackage — nix.dev documentation may be helpful, and OP provided a package expression above so you shouldn’t need to write it from scratch.

This should work just fine.

{
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  kdePackages,
}:

stdenv.mkDerivation rec {
  pname = "klassy";
  version = "6.4.breeze6.4.0";

  src = fetchFromGitHub {
    owner = "paulmcauley";
    repo = pname;
    rev = version;
    sha256 = "sha256-psXlkTo11e1Yuk85pI1KTRHl0eVdXh0bXcYbnhTa7Qk=";
  };

  cmakeFlags = [
    "-DBUILD_TESTING=OFF"
    "-DBUILD_QT5=OFF"
  ];

  nativeBuildInputs = [
    cmake
    kdePackages.extra-cmake-modules
    kdePackages.wrapQtAppsHook
  ];

  buildInputs = [
    kdePackages.kdecoration
    kdePackages.kcoreaddons
    kdePackages.kguiaddons
    kdePackages.kconfigwidgets
    kdePackages.kiconthemes
    kdePackages.kwayland
    kdePackages.kwindowsystem
    kdePackages.kirigami
    kdePackages.frameworkintegration
    kdePackages.kcmutils
    kdePackages.qtsvg
  ];

  meta = with lib; {
    description = "A highly customizable binary Window Decoration and Application Style plugin for recent versions of the KDE Plasma desktop";
    homepage = "https://github.com/paulmcauley/klassy";
    license = with licenses; [
      gpl2Only
      gpl2Plus
      gpl3Only
      bsd3
      mit
    ];
  };
}