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

**URL:** https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540
**Category:** Help
**Created:** [August 13, 2024, 8:43am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540 "2024-08-13T08:43:41Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![muiga](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@muiga](https://discourse.nixos.org/u/muiga)
#### Post date: [August 13, 2024, 8:43am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/1 "2024-08-13T08:43:41Z")

</div>

```auto
{ 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;
  };
}

```

---

<div class="post-metadata">

### Author: ![mightyiam](https://discourse.nixos.org/user_avatar/discourse.nixos.org/mightyiam/32/33998_2.png) [@mightyiam](https://discourse.nixos.org/u/mightyiam)
#### Post date: [August 16, 2024, 4:53am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/2 "2024-08-16T04:53:38Z")

</div>

Is there anything specific you are unsure of?

---

<div class="post-metadata">

### Author: ![learningnix](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/l/f0a364/32.png) [@learningnix](https://discourse.nixos.org/u/learningnix)
#### Post date: [January 10, 2025, 12:24am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/3 "2025-01-10T00:24:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![waffle8946](https://discourse.nixos.org/user_avatar/discourse.nixos.org/waffle8946/32/27221_2.png) [@waffle8946](https://discourse.nixos.org/u/waffle8946)
#### Post date: [January 10, 2025, 5:08am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/4 "2025-01-10T05:08:42Z")

</div>

What part are you stuck on?  
[Packaging existing software with Nix — nix.dev documentation](https://nix.dev/tutorials/packaging-existing-software) and [Package parameters and overrides with callPackage — nix.dev documentation](https://nix.dev/tutorials/callpackage) may be helpful, and OP provided a package expression above so you shouldn’t need to write it from scratch.

---

<div class="post-metadata">

### Author: ![RoccoRakete](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@RoccoRakete](https://discourse.nixos.org/u/RoccoRakete)
#### Post date: [June 23, 2025, 8:01pm UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/5 "2025-06-23T20:01:30Z")

</div>

This should work just fine.

```auto
{
  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
    ];
  };
}

```

---

<div class="post-metadata">

### Author: ![rageblob](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rageblob/32/33335_2.png) [@rageblob](https://discourse.nixos.org/u/rageblob)
#### Post date: [July 19, 2025, 11:43pm UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/6 "2025-07-19T23:43:26Z")

</div>

@RoccoRakete From a Nix rookie, thank you so much! This worked like a charm!  
Only the sha256 hash you provided was incorrect.  
I ran `nix-prefetch-url --type sha256 --unpack https://github.com/paulmcauley/klassy/archive/refs/tags/6.4.breeze6.4.0.tar.gz` to get the correct one.  
Afterwards `nixos-rebuild switch` finished without issues and I can now use and enjoy Klassy on my system. 😊

In case anyone after me encounters this issue; here’s my working config:  
[Here](https://github.com/rageblob/NixOS_config/blob/main/custom/klassy.nix) is the Klassy derivation. I then include it [like so](https://github.com/rageblob/NixOS_config/blob/main/cfg/kde-plasma.nix#L7-L10).

---

<div class="post-metadata">

### Author: ![RoccoRakete](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/r/df788c/32.png) [@RoccoRakete](https://discourse.nixos.org/u/RoccoRakete)
#### Post date: [July 20, 2025, 6:00am UTC](https://discourse.nixos.org/t/i-want-to-build-a-custom-package-klassy-for-my-nixos-installation-please-help-me-refine-the-default-nix-file/50540/7 "2025-07-20T06:00:15Z")

</div>

Hi!

I‘m glad I could help!

It’s totally possible, that the hash is out of date. I haven’t built Klassy in a while…
