{ version ? "dirty", lib, stdenvNoCC, # build qt6, quickshell, # runtime deps brightnessctl, cava, cliphist, ddcutil, matugen, wlsunset, wl-clipboard, imagemagick, wget, gpu-screen-recorder, # optional # calendar support calendarSupport ? false, python3, evolution-data-server, libical, glib, libsoup_3, json-glib, gobject-introspection, }: let src = lib.cleanSourceWith { src = ../.; filter = path: type: !(builtins.any (prefix: lib.path.hasPrefix (../. + prefix) (/. + path)) [ /.github /.gitignore /Assets/Screenshots /Bin/dev /nix /LICENSE /README.md /flake.nix /flake.lock /shell.nix /lefthook.yml /CLAUDE.md /CREDITS.md ]); }; runtimeDeps = [ brightnessctl cava cliphist ddcutil matugen wlsunset wl-clipboard imagemagick wget ] ++ lib.optionals (stdenvNoCC.hostPlatform.system == "x86_64-linux") [ gpu-screen-recorder ] ++ lib.optional calendarSupport (python3.withPackages (pp: [ pp.pygobject3 ])); giTypelibPath = lib.makeSearchPath "lib/girepository-1.0" [ evolution-data-server libical glib.out libsoup_3 json-glib gobject-introspection ]; in stdenvNoCC.mkDerivation { pname = "noctalia-shell"; inherit version src; nativeBuildInputs = [ qt6.wrapQtAppsHook ]; buildInputs = [ qt6.qtbase qt6.qtmultimedia ]; installPhase = '' mkdir -p $out/share/noctalia-shell $out/bin cp -r . $out/share/noctalia-shell ln -s ${quickshell}/bin/qs $out/bin/noctalia-shell ''; preFixup = '' qtWrapperArgs+=( --prefix PATH : ${lib.makeBinPath runtimeDeps} --add-flags "-p $out/share/noctalia-shell" ${lib.optionalString calendarSupport "--prefix GI_TYPELIB_PATH : ${giTypelibPath}"} ) ''; meta = { description = "A sleek and minimal desktop shell thoughtfully crafted for Wayland, built with Quickshell."; homepage = "https://github.com/noctalia-dev/noctalia-shell"; license = lib.licenses.mit; mainProgram = "noctalia-shell"; }; }