From 1c5d82dd327673081492a8a7c8facc4001d0ffd9 Mon Sep 17 00:00:00 2001 From: Lin Xianyi Date: Sun, 1 Mar 2026 13:00:47 +0800 Subject: [PATCH] noctalia-qs: init at 0.0.9 --- .../0001-fix-unneccessary-reloads.patch | 23 +++++ pkgs/by-name/no/noctalia-qs/package.nix | 93 +++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 pkgs/by-name/no/noctalia-qs/0001-fix-unneccessary-reloads.patch create mode 100644 pkgs/by-name/no/noctalia-qs/package.nix diff --git a/pkgs/by-name/no/noctalia-qs/0001-fix-unneccessary-reloads.patch b/pkgs/by-name/no/noctalia-qs/0001-fix-unneccessary-reloads.patch new file mode 100644 index 000000000000..85d4a74b9ad5 --- /dev/null +++ b/pkgs/by-name/no/noctalia-qs/0001-fix-unneccessary-reloads.patch @@ -0,0 +1,23 @@ +diff --git a/src/core/generation.cpp b/src/core/generation.cpp +index c68af71..4967562 100644 +--- a/src/core/generation.cpp ++++ b/src/core/generation.cpp +@@ -172,12 +172,18 @@ void EngineGeneration::setWatchingFiles(bool watching) { + if (this->watcher == nullptr) { + this->watcher = new QFileSystemWatcher(); + ++ // note: not using canonicalFilePath() here on purpose, ++ // since the path could be a link to the nix store ++ // and the link might change ++ + for (auto& file: this->scanner.scannedFiles) { ++ if (file.startsWith("/nix/store/")) continue; + this->watcher->addPath(file); + this->watcher->addPath(QFileInfo(file).dir().absolutePath()); + } + + for (auto& file: this->extraWatchedFiles) { ++ if (file.startsWith("/nix/store/")) continue; + this->watcher->addPath(file); + this->watcher->addPath(QFileInfo(file).dir().absolutePath()); + } diff --git a/pkgs/by-name/no/noctalia-qs/package.nix b/pkgs/by-name/no/noctalia-qs/package.nix new file mode 100644 index 000000000000..265eae434676 --- /dev/null +++ b/pkgs/by-name/no/noctalia-qs/package.nix @@ -0,0 +1,93 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + + pkg-config, + cmake, + ninja, + spirv-tools, + qt6, + breakpad, + jemalloc, + cli11, + wayland, + wayland-protocols, + wayland-scanner, + libxcb, + libdrm, + libgbm ? null, + vulkan-headers, + pipewire, + pam, + polkit, + glib, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "noctalia-qs"; + version = "0.0.9"; + + src = fetchFromGitHub { + owner = "noctalia-dev"; + repo = "noctalia-qs"; + tag = "v${finalAttrs.version}"; + hash = "sha256-oRqz+5AbNKfUWWwN5c83CsSOsUWVGITh0HZg+wX5Q/8="; + }; + + patches = [ + ./0001-fix-unneccessary-reloads.patch + ]; + + nativeBuildInputs = [ + cmake + ninja + spirv-tools + pkg-config + qt6.qtwayland + qt6.wrapQtAppsHook + wayland-scanner + ]; + + buildInputs = [ + qt6.qtbase + qt6.qtdeclarative + qt6.qtwayland + qt6.qtsvg + cli11 + wayland + wayland-protocols + libdrm + libgbm + vulkan-headers + breakpad + jemalloc + libxcb + pam + pipewire + polkit + glib + ]; + + cmakeFlags = [ + (lib.cmakeFeature "DISTRIBUTOR" "Nixpkgs") + (lib.cmakeBool "DISTRIBUTOR_DEBUGINFO_AVAILABLE" true) + (lib.cmakeFeature "INSTALL_QML_PREFIX" qt6.qtbase.qtQmlPrefix) + (lib.cmakeFeature "GIT_REVISION" "tag-v${finalAttrs.version}") + ]; + + cmakeBuildType = "RelWithDebInfo"; + separateDebugInfo = true; + dontStrip = false; + + passthru.updateScript = nix-update-script { }; + + meta = { + homepage = "https://github.com/noctalia-dev/noctalia-qs"; + description = "Flexbile QtQuick based desktop shell toolkit"; + license = lib.licenses.lgpl3Only; + platforms = lib.platforms.linux; + mainProgram = "quickshell"; + maintainers = with lib.maintainers; [ iynaix ]; + }; +})