From afed1365ffaeb7b799632c73da1788d4c84f1582 Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Wed, 22 Oct 2025 04:49:36 +0100 Subject: [PATCH 1/3] qt6Packages.qxlsx: add fix for qt 6.10 `qxlsx` is failing to build with `nix-pkg-review`, with this error: qxlsx> CMake Error at CMakeLists.txt:167 (target_link_libraries): qxlsx> Target "QXlsx" links to: qxlsx> qxlsx> Qt6::GuiPrivate qxlsx> qxlsx> but the target was not found. The upstream `qxlsx` has been patched to fix this, but as a new upstream version has not been released, this fix is not present in `nixpkgs` even though `nixpkgs` has now bumped `qt6` to version 6.10.0 in PR 449572. Thus, directly apply the patch made in this commit: https://github.com/QtExcel/QXlsx/commit/90d762625750c6b2c73f6cd96b633e9158aed72e --- pkgs/development/libraries/qxlsx/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/libraries/qxlsx/default.nix b/pkgs/development/libraries/qxlsx/default.nix index a9280ae76f47..59b734382ab6 100644 --- a/pkgs/development/libraries/qxlsx/default.nix +++ b/pkgs/development/libraries/qxlsx/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, qtbase, }: @@ -17,6 +18,14 @@ stdenv.mkDerivation rec { hash = "sha256-twOlAiLE0v7+9nWo/Gd+oiKT1umL3UnG1Xa0zDG7u7s="; }; + patches = [ + # Fix for Qt 6.10, can likely be removed when version bump passes v1.5.0. + (fetchpatch { + url = "https://github.com/QtExcel/QXlsx/commit/90d762625750c6b2c73f6cd96b633e9158aed72e.patch"; + hash = "sha256-/0xLrkjuJGZRocK1EyBhuaUmg0usueQz2F340DkQhb0="; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ qtbase ]; From ae2f6f2c74092df3d0d4812e6264525e2095328f Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Sun, 26 Oct 2025 20:04:19 +0000 Subject: [PATCH 2/3] stellarium: fix build on qt610 --- .../applications/science/astronomy/stellarium/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/applications/science/astronomy/stellarium/default.nix index e883582bdcc8..ca6a9c36fa21 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/applications/science/astronomy/stellarium/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, perl, wrapGAppsHook3, @@ -37,6 +38,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9uQ6u1+dSszmKG8eY6kSXhqsCPRGw6tulCTCrLByIxc="; }; + patches = [ + (fetchpatch { + url = "https://gitlab.archlinux.org/archlinux/packaging/packages/stellarium/-/raw/ab559b6e9349569278f83c2dfc83990e971a8cb2/qt-6.10.patch"; + hash = "sha256-a7zC9IQOj93VnPy8Bj/fLe4oJux7I4Edgj5OaKI4TZU="; + }) + ]; + postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace CMakeLists.txt \ --replace-fail 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \ From ce0937bc1d8da74461df0c27e6bae698fa69c547 Mon Sep 17 00:00:00 2001 From: magicquark <198001825+magicquark@users.noreply.github.com> Date: Sun, 26 Oct 2025 22:34:16 +0000 Subject: [PATCH 3/3] stellarium: migrate to pkgs/by-name --- .../st/stellarium/package.nix} | 36 ++++++++----------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 14 insertions(+), 24 deletions(-) rename pkgs/{applications/science/astronomy/stellarium/default.nix => by-name/st/stellarium/package.nix} (87%) diff --git a/pkgs/applications/science/astronomy/stellarium/default.nix b/pkgs/by-name/st/stellarium/package.nix similarity index 87% rename from pkgs/applications/science/astronomy/stellarium/default.nix rename to pkgs/by-name/st/stellarium/package.nix index ca6a9c36fa21..28b977fc7117 100644 --- a/pkgs/applications/science/astronomy/stellarium/default.nix +++ b/pkgs/by-name/st/stellarium/package.nix @@ -6,19 +6,11 @@ cmake, perl, wrapGAppsHook3, - wrapQtAppsHook, - qtbase, - qtcharts, - qtpositioning, - qtmultimedia, - qtserialport, - qtwayland, - qtwebengine, + qt6, + qt6Packages, calcmysky, - qxlsx, indilib, libnova, - qttools, exiv2, nlopt, testers, @@ -50,26 +42,26 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail 'SET(CMAKE_INSTALL_PREFIX "''${PROJECT_BINARY_DIR}/Stellarium.app/Contents")' \ 'SET(CMAKE_INSTALL_PREFIX "${placeholder "out"}/Applications/Stellarium.app/Contents")' substituteInPlace src/CMakeLists.txt \ - --replace-fail "\''${_qt_bin_dir}/../" "${qtmultimedia}/lib/qt-6/" + --replace-fail "\''${_qt_bin_dir}/../" "${qt6.qtmultimedia}/lib/qt-6/" ''; nativeBuildInputs = [ cmake perl wrapGAppsHook3 - wrapQtAppsHook - qttools + qt6.wrapQtAppsHook + qt6.qttools ]; buildInputs = [ - qtbase - qtcharts - qtpositioning - qtmultimedia - qtserialport - qtwebengine + qt6.qtbase + qt6.qtcharts + qt6.qtpositioning + qt6.qtmultimedia + qt6.qtserialport + qt6.qtwebengine calcmysky - qxlsx + qt6Packages.qxlsx indilib libnova exiv2 @@ -77,7 +69,7 @@ stdenv.mkDerivation (finalAttrs: { nlopt ] ++ lib.optionals stdenv.hostPlatform.isLinux [ - qtwayland + qt6.qtwayland ]; preConfigure = '' @@ -88,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { ''; # fatal error: 'QtSerialPort/QSerialPortInfo' file not found - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-F${qtserialport}/lib"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-F${qt6.qtserialport}/lib"; dontWrapGApps = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 486b519307ce..bc2b17fbb49b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14232,8 +14232,6 @@ with pkgs; spyder = with python3.pkgs; toPythonApplication spyder; - stellarium = qt6Packages.callPackage ../applications/science/astronomy/stellarium { }; - tulip = libsForQt5.callPackage ../applications/science/misc/tulip { python3 = python312; # fails to build otherwise };