diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix index a5058f9b78346eb..fbfc50a1a68442e 100644 --- a/pkgs/applications/audio/musescore/default.nix +++ b/pkgs/applications/audio/musescore/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchFromGitHub +, fetchpatch , cmake , wrapQtAppsHook , pkg-config @@ -18,15 +19,16 @@ , portmidi , qtbase , qtdeclarative -, qtgraphicaleffects , flac -, qtquickcontrols -, qtquickcontrols2 -, qtscript +, libopusenc +, libopus +, tinyxml-2 +, qt5compat +, qtwayland , qtsvg -, qtxmlpatterns +, qtscxml , qtnetworkauth -, qtx11extras +, qttools , nixosTests , darwin }: @@ -47,27 +49,36 @@ let } else portaudio; in stdenv'.mkDerivation (finalAttrs: { pname = "musescore"; - version = "4.3.0"; + version = "4.4.1"; src = fetchFromGitHub { owner = "musescore"; repo = "MuseScore"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-X3zvrIf5DOC5PWcnuw0aClm++IWUED1ZzAyjnp7Mo+g="; + sha256 = "sha256-eLtpLgXSc8L5y1Mg3s1wrxr09+/vBxNqJEtl9IoKYSM="; }; + patches = [ + # https://github.com/musescore/MuseScore/pull/24326 + (fetchpatch { + name = "fix-menubar-with-qt6.5+.patch"; + url = "https://github.com/musescore/MuseScore/pull/24326/commits/b274f13311ad0b2bce339634a006ba22fbd3379e.patch"; + hash = "sha256-ZGmjRa01CBEIxJdJYQMhdg4A9yjWdlgn0pCPmENBTq0="; + }) + ]; cmakeFlags = [ - "-DMUSESCORE_BUILD_MODE=release" + "-DMUSE_APP_BUILD_MODE=release" # Disable the build and usage of the `/bin/crashpad_handler` utility - it's # not useful on NixOS, see: # https://github.com/musescore/MuseScore/issues/15571 - "-DMUE_BUILD_CRASHPAD_CLIENT=OFF" - # Use our freetype + "-DMUSE_MODULE_DIAGNOSTICS_CRASHPAD_CLIENT=OFF" + # Use our versions of system libraries "-DMUE_COMPILE_USE_SYSTEM_FREETYPE=ON" - # From some reason, in $src/build/cmake/SetupBuildEnvironment.cmake, - # upstream defaults to compiling to x86_64 only, unless this cmake flag is - # set - "-DMUE_COMPILE_BUILD_MACOS_APPLE_SILICON=ON" + "-DMUE_COMPILE_USE_SYSTEM_HARFBUZZ=ON" + "-DMUE_COMPILE_USE_SYSTEM_TINYXML=ON" + # Implies also -DMUE_COMPILE_USE_SYSTEM_OPUS=ON + "-DMUE_COMPILE_USE_SYSTEM_OPUSENC=ON" + "-DMUE_COMPILE_USE_SYSTEM_FLAC=ON" # Don't bundle qt qml files, relevant really only for darwin, but we set # this for all platforms anyway. "-DMUE_COMPILE_INSTALL_QTQML_FILES=OFF" @@ -87,6 +98,7 @@ in stdenv'.mkDerivation (finalAttrs: { nativeBuildInputs = [ wrapQtAppsHook cmake + qttools pkg-config ninja ]; @@ -102,18 +114,20 @@ in stdenv'.mkDerivation (finalAttrs: { portaudio' portmidi flac + libopusenc + libopus + tinyxml-2 qtbase qtdeclarative - qtgraphicaleffects - qtquickcontrols - qtquickcontrols2 - qtscript + qt5compat qtsvg - qtxmlpatterns + qtscxml qtnetworkauth - qtx11extras ] ++ lib.optionals stdenv.isLinux [ alsa-lib + qtwayland + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.Cocoa ]; postInstall = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e35acd75d2e75a..8e1e1b96501e9a7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -32999,7 +32999,7 @@ with pkgs; autoreconfHook = buildPackages.autoreconfHook269; }; - musescore = libsForQt5.callPackage ../applications/audio/musescore { }; + musescore = qt6Packages.callPackage ../applications/audio/musescore { }; music-player = callPackage ../applications/audio/music-player { };