Change:
<!-- Note that these are hard requirements --<!-- You can use the "Go to file" functionality on GitHub to find the package Then you can go to the history for this package Find the latest "packagename: oldversion -newversion" commit The "newversion" is the current version of the package --- <!-- Type the name of your package and try to find an open pull request for the package If you find an open pull request, you can review it! There's a high chance that you'll have the new version right away while helping the community! --- name: musescore <!-- The current version can be found easily with the same process as above for checking the master branch If an open PR is present for the package, take this version as the current one and link to the PR --current version: 3.6.2 desired version: 4.0 <!-- Search your package here: If no maintainer is listed for your package, tag the person that last updated the package --maintainers: Please tag this issue in your PR.

Discussion:
mpv = handleTest ./mpv.nix {}; mtp = handleTest ./mtp.nix {}; mumble = handleTest ./mumble.nix {}; <del> musescore = handleTest ./musescore.nix {}; </del> <ins> # Fails on aarch64-linux at the PDF creation step - need to debug this on an # aarch64 machine.. musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {}; </ins> munin = handleTest ./munin.nix {}; mutableUsers = handleTest ./mutable-users.nix {}; mxisd = handleTest ./mxisd.nix {};

let # Make sure we don't have to go through the startup tutorial <del> customMuseScoreConfig = pkgs.writeText "MuseScore3.ini" '' </del> <ins> customMuseScoreConfig = pkgs.writeText "MuseScore4.ini" '' </ins> [application] <del> startupfirstStart=false </del> <ins> hasCompletedFirstLaunchSetup=true </ins> <del> [ui] applicationstartupshowTours=false applicationstartupshowStartCenter=false </del> <ins> [project] preferredScoreCreationMode=1 </ins> ''; in {

# Inject custom settings machine.succeed("mkdir -p /root/.config/MuseScore/") machine.succeed( <del> "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore3.ini" </del> <ins> "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore4.ini" </ins> ) # Start MuseScore window machine.execute("DISPLAY=:0.0 mscore >&2 &") # Wait until MuseScore has launched <del> machine.wait_for_window("MuseScore") </del> <ins> machine.wait_for_window("MuseScore 4") </ins> # Wait until the window has completely initialised <del> machine.wait_for_text("MuseScore") </del> <ins> machine.wait_for_text("MuseScore 4") machine.screenshot("MuseScore0") # Create a new score machine.send_key("ctrl-n") # Wait until the creation wizard appears machine.wait_for_window("New score") machine.screenshot("MuseScore1") machine.send_key("tab") machine.send_key("tab") machine.send_key("tab") machine.send_key("tab") machine.send_key("right") machine.send_key("right") machine.send_key("ret") machine.sleep(1) </ins> <del> # Start entering notes machine.send_key("n") </del> # Type the beginning of https://de.wikipedia.org/wiki/Alle_meine_Entchen machine.send_chars("cdef6gg5aaaa7g") <del> # Make sure the VM catches up with all the keys </del> machine.sleep(1) <del> machine.screenshot("MuseScore0") </del> <ins> machine.screenshot("MuseScore2") </ins> # Go to the export dialogue and create a PDF machine.send_key("alt-f")

machine.send_key("e") # Wait until the export dialogue appears. <del> machine.wait_for_window("Export") machine.screenshot("MuseScore1") machine.send_key("shift-tab") machine.sleep(1) </del> <ins> machine.wait_for_text("Export") machine.screenshot("MuseScore3") </ins> machine.send_key("shift-tab") machine.sleep(1) machine.send_key("ret") machine.sleep(1) machine.send_key("ret") <del> machine.screenshot("MuseScore2") </del> <ins> machine.screenshot("MuseScore4") </ins> # Wait until PDF is exported <del> machine.wait_for_file("/root/Documents/MuseScore3/Scores/Untitled.pdf") </del> <ins> machine.wait_for_file('"/root/Documents/MuseScore4/Scores/Untitled score.pdf"') </ins> # Check that it contains the title of the score <del> machine.succeed("pdfgrep Title /root/Documents/MuseScore3/Scores/Untitled.pdf") </del> <ins> machine.succeed('pdfgrep "Untitled score" "/root/Documents/MuseScore4/Scores/Untitled score.pdf"') </ins> <del> machine.screenshot("MuseScore3") </del> <ins> machine.screenshot("MuseScore5") </ins> ''; })

{ stdenv, lib, fetchurl, undmg }: let <del> versionComponents = [ "3" "6" "2" "548020600" ]; </del> <ins> versionComponents = [ "4" "0" "1" ]; </ins> appName = "MuseScore ${builtins.head versionComponents}"; <ins> ref = "230121751"; </ins> in stdenv.mkDerivation rec {

sourceRoot = "${appName}.app"; src = fetchurl { <del> url = "https://github.com/musescore/MuseScore/releases/download/v${lib.concatStringsSep "." (lib.take 3 versionComponents)}/MuseScore-${version}.dmg"; sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0="; </del> <ins> url =  "https://github.com/musescore/MuseScore/releases/download/v${version}/MuseScore-${version}.${ref}.dmg"; hash = "sha256-tkIEV+tCS0SYh2TlC70/zEBUEOSg//EaSKDGA7kH/vo="; </ins> }; buildInputs = [ undmg ];

<del> { mkDerivation, lib, fetchFromGitHub, cmake, pkg-config </del> <ins> { mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, ninja </ins> , alsa-lib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis <del> , portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects </del> <ins> , portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects, flac </ins> , qtquickcontrols2, qtscript, qtsvg, qttools <del> , qtwebengine, qtxmlpatterns </del> <ins> , qtwebengine, qtxmlpatterns, qtnetworkauth, qtx11extras </ins> , nixosTests }: mkDerivation rec { pname = "musescore"; <del> version = "3.6.2"; </del> <ins> version = "4.0.1"; </ins> src = fetchFromGitHub { owner = "musescore"; repo = "MuseScore"; rev = "v${version}"; <del> sha256 = "sha256-GBGAD/qdOhoNfDzI+O0EiKgeb86GFJxpci35T6tZ+2s="; </del> <ins> sha256 = "sha256-Xhjjm/pYcjfZE632eP2jujqUAmzdYNa81EPrvS5UKnQ="; </ins> }; patches = [ <del> ./remove_qtwebengine_install_hack.patch </del> <ins> # See https://github.com/musescore/MuseScore/issues/15571 (fetchpatch { url = "https://github.com/musescore/MuseScore/commit/365be5dfb7296ebee4677cb74b67c1721bc2cf7b.patch"; hash = "sha256-tJ2M21i3geO9OsjUQKNatSXTkJ5U9qMT4RLNdJnyoKw="; }) </ins> ]; cmakeFlags = [ "-DMUSESCORE_BUILD_CONFIG=release" <ins> # Disable the _usage_ of the `/bin/crashpad_handler` utility. See: # https://github.com/musescore/MuseScore/pull/15577 "-DBUILD_CRASHPAD_CLIENT=OFF" # Use our freetype </ins> "-DUSE_SYSTEM_FREETYPE=ON" ];

"--set-default QT_QPA_PLATFORM xcb" ]; <del> nativeBuildInputs = [ cmake pkg-config ]; </del> <ins> nativeBuildInputs = [ cmake pkg-config ninja ]; </ins> buildInputs = [ alsa-lib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis <del> portaudio portmidi # tesseract </del> <ins> portaudio portmidi flac # tesseract </ins> qtbase qtdeclarative qtgraphicaleffects qtquickcontrols2 <del> qtscript qtsvg qttools qtwebengine qtxmlpatterns </del> <ins> qtscript qtsvg qttools qtwebengine qtxmlpatterns qtnetworkauth qtx11extras </ins> ]; passthru.tests = nixosTests.musescore;

meta = with lib; { description = "Music notation and composition software"; homepage = "https://musescore.org/"; <del> license = licenses.gpl2; </del> <ins> license = licenses.gpl3Only; </ins> maintainers = with maintainers; [ vandenoever turion doronbehar ]; <ins> # Darwin requires CoreMIDI from SDK 11.3, we use the upstream built .dmg # file in ./darwin.nix in the meantime. </ins> platforms = platforms.linux; }; }

<del> --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -220,16 +219,0 @@ else (MINGW) -      ## install qwebengine core -      if (NOT APPLE AND USE_WEBENGINE) -         install(PROGRAMS -            ${QT_INSTALL_LIBEXECS}/QtWebEngineProcess -            DESTINATION bin -            ) -         install(DIRECTORY -            ${QT_INSTALL_DATA}/resources -            DESTINATION lib/qt5 -            ) -         install(DIRECTORY -            ${QT_INSTALL_TRANSLATIONS}/qtwebengine_locales -            DESTINATION lib/qt5/translations -            ) -      endif(NOT APPLE AND USE_WEBENGINE) - </del>