{
  stdenv,
  lib,
  fetchFromGitHub,
  qtbase,
  # qtx11extras,
  # qttools,
  # kglobalaccel,
  # kinit,
  kwin,
  # kio,
  # kguiaddons,
  # kcoreaddons,
  # systemsettings,
  cmake,
  qt5Full,
  extra-cmake-modules,
  wrapQtAppsHook,
  libepoxy,
  kdelibs4support,
  libXdmcp
}:

stdenv.mkDerivation rec {
  pname = "LightlyShaders";
  version = "2.0.0";

  src = fetchFromGitHub {
    owner = "a-parhom";
    repo = "LightlyShaders";
    rev = "v2.0";
    sha256 = "sha256-5BpAXv5n9mxUMWjtIRJYCf4pQ76pCyKwGhk9uaHC69M=";
  };

  # dontWrapQtApps = true;

  buildInputs = [
    qtbase
    qt5Full
    # qtx11extras
    # qttools
    # kglobalaccel
    kdelibs4support
    # kinit
    kwin
    # kio
    # kguiaddons
    # kcoreaddons
    # systemsettings
    libepoxy
    libXdmcp
  ];

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

  # preConfigure = ''
  #   # local modulepath=$(kf5-config --install module)
  #   # local datapath=$(kf5-config --install data)
  #   # local servicespath=$(kf5-config --install services)
  #   # substituteInPlace CMakeLists.txt \
  #   #   --replace "\''${MODULEPATH}" "$out/''${modulepath#/nix/store/*/}" \
  #   #   --replace "\''${DATAPATH}"   "$out/''${datapath#/nix/store/*/}"

  #   # substituteInPlace CMakeLists.txt \
  #   #   --replace "\''${MODULEPATH}" "$out/qt-5.15.3/plugins" \
  #   #   --replace "\''${DATAPATH}"   "$out/share"
  # '';

  postConfigure = ''
    substituteInPlace cmake_install.cmake \
      --replace "${kdelibs4support}" "$out"

  '';

  meta = with lib; {
    name = "LightlyShaders";
    description = "Round corners and outline effect for KWin.";
    homepage = "https://github.com/a-parhom/LightlyShaders";
    license = licenses.gpl3;
    maintainers = [ "chriscochrun" ];
    platforms = platforms.all;
  };
}
