summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2023-02-05 12:00:06 +0200
committerGitHub <noreply@github.com>2023-02-05 12:00:06 +0200
commit42b3a6354fde25436733f56eebcd17d3fdf857a3 (patch)
treef60289351dc672a7c2852ad61dd291f6989ee5e5
parentecf734051b1cebadabc32c3454198b2bd9365575 (diff)
parent3917d02350297844cafa09071bf4704efaf86c7e (diff)
Merge pull request #206559 from doronbehar/pkg/musescore
musescore: 3.6.2 -> 4.0.1
-rw-r--r--nixos/tests/all-tests.nix4
-rw-r--r--nixos/tests/musescore.nix56
-rw-r--r--pkgs/applications/audio/musescore/darwin.nix7
-rw-r--r--pkgs/applications/audio/musescore/default.nix31
-rw-r--r--pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch19
5 files changed, 63 insertions, 54 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index a23a0413160e..7b1159d66715 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -414,7 +414,9 @@ in {
mtp = handleTest ./mtp.nix {};
multipass = handleTest ./multipass.nix {};
mumble = handleTest ./mumble.nix {};
- musescore = handleTest ./musescore.nix {};
+ # Fails on aarch64-linux at the PDF creation step - need to debug this on an
+ # aarch64 machine..
+ musescore = handleTestOn ["x86_64-linux"] ./musescore.nix {};
munin = handleTest ./munin.nix {};
mutableUsers = handleTest ./mutable-users.nix {};
mxisd = handleTest ./mxisd.nix {};
diff --git a/nixos/tests/musescore.nix b/nixos/tests/musescore.nix
index ac2f4ba74c0f..6aeb0558a49d 100644
--- a/nixos/tests/musescore.nix
+++ b/nixos/tests/musescore.nix
@@ -2,13 +2,12 @@ import ./make-test-python.nix ({ pkgs, ...} :
let
# Make sure we don't have to go through the startup tutorial
- customMuseScoreConfig = pkgs.writeText "MuseScore3.ini" ''
+ customMuseScoreConfig = pkgs.writeText "MuseScore4.ini" ''
[application]
- startup\firstStart=false
+ hasCompletedFirstLaunchSetup=true
- [ui]
- application\startup\showTours=false
- application\startup\showStartCenter=false
+ [project]
+ preferredScoreCreationMode=1
'';
in
{
@@ -40,26 +39,43 @@ in
# Inject custom settings
machine.succeed("mkdir -p /root/.config/MuseScore/")
machine.succeed(
- "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore3.ini"
+ "cp ${customMuseScoreConfig} /root/.config/MuseScore/MuseScore4.ini"
)
# Start MuseScore window
machine.execute("DISPLAY=:0.0 mscore >&2 &")
# Wait until MuseScore has launched
- machine.wait_for_window("MuseScore")
+ machine.wait_for_window("MuseScore 4")
# Wait until the window has completely initialised
- machine.wait_for_text("MuseScore")
+ 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)
- # Start entering notes
- machine.send_key("n")
# Type the beginning of https://de.wikipedia.org/wiki/Alle_meine_Entchen
machine.send_chars("cdef6gg5aaaa7g")
- # Make sure the VM catches up with all the keys
machine.sleep(1)
- machine.screenshot("MuseScore0")
+ machine.screenshot("MuseScore2")
# Go to the export dialogue and create a PDF
machine.send_key("alt-f")
@@ -67,24 +83,24 @@ in
machine.send_key("e")
# Wait until the export dialogue appears.
- machine.wait_for_window("Export")
- machine.screenshot("MuseScore1")
- machine.send_key("shift-tab")
- machine.sleep(1)
+ machine.wait_for_text("Export")
+
+ machine.screenshot("MuseScore3")
+
machine.send_key("shift-tab")
machine.sleep(1)
machine.send_key("ret")
machine.sleep(1)
machine.send_key("ret")
- machine.screenshot("MuseScore2")
+ machine.screenshot("MuseScore4")
# Wait until PDF is exported
- machine.wait_for_file("/root/Documents/MuseScore3/Scores/Untitled.pdf")
+ machine.wait_for_file('"/root/Documents/MuseScore4/Scores/Untitled score.pdf"')
# Check that it contains the title of the score
- machine.succeed("pdfgrep Title /root/Documents/MuseScore3/Scores/Untitled.pdf")
+ machine.succeed('pdfgrep "Untitled score" "/root/Documents/MuseScore4/Scores/Untitled score.pdf"')
- machine.screenshot("MuseScore3")
+ machine.screenshot("MuseScore5")
'';
})
diff --git a/pkgs/applications/audio/musescore/darwin.nix b/pkgs/applications/audio/musescore/darwin.nix
index 88b5d3b74c15..652adb03b66a 100644
--- a/pkgs/applications/audio/musescore/darwin.nix
+++ b/pkgs/applications/audio/musescore/darwin.nix
@@ -1,8 +1,9 @@
{ stdenv, lib, fetchurl, undmg }:
let
- versionComponents = [ "3" "6" "2" "548020600" ];
+ versionComponents = [ "4" "0" "1" ];
appName = "MuseScore ${builtins.head versionComponents}";
+ ref = "230121751";
in
stdenv.mkDerivation rec {
@@ -13,8 +14,8 @@ stdenv.mkDerivation rec {
sourceRoot = "${appName}.app";
src = fetchurl {
- url = "https://github.com/musescore/MuseScore/releases/download/v${lib.concatStringsSep "." (lib.take 3 versionComponents)}/MuseScore-${version}.dmg";
- sha256 = "sha256-lHckfhTTrDzaGwlbnZ5w0O1gMPbRmrmgATIGMY517l0=";
+ url = "https://github.com/musescore/MuseScore/releases/download/v${version}/MuseScore-${version}.${ref}.dmg";
+ hash = "sha256-tkIEV+tCS0SYh2TlC70/zEBUEOSg//EaSKDGA7kH/vo=";
};
buildInputs = [ undmg ];
diff --git a/pkgs/applications/audio/musescore/default.nix b/pkgs/applications/audio/musescore/default.nix
index 573a78a92583..531ed8569d5d 100644
--- a/pkgs/applications/audio/musescore/default.nix
+++ b/pkgs/applications/audio/musescore/default.nix
@@ -1,28 +1,35 @@
-{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config
+{ mkDerivation, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, ninja
, alsa-lib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
-, portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects
+, portaudio, portmidi, qtbase, qtdeclarative, qtgraphicaleffects, flac
, qtquickcontrols2, qtscript, qtsvg, qttools
-, qtwebengine, qtxmlpatterns
+, qtwebengine, qtxmlpatterns, qtnetworkauth, qtx11extras
, nixosTests
}:
mkDerivation rec {
pname = "musescore";
- version = "3.6.2";
+ version = "4.0.1";
src = fetchFromGitHub {
owner = "musescore";
repo = "MuseScore";
rev = "v${version}";
- sha256 = "sha256-GBGAD/qdOhoNfDzI+O0EiKgeb86GFJxpci35T6tZ+2s=";
+ sha256 = "sha256-Xhjjm/pYcjfZE632eP2jujqUAmzdYNa81EPrvS5UKnQ=";
};
-
patches = [
- ./remove_qtwebengine_install_hack.patch
+ # See https://github.com/musescore/MuseScore/issues/15571
+ (fetchpatch {
+ url = "https://github.com/musescore/MuseScore/commit/365be5dfb7296ebee4677cb74b67c1721bc2cf7b.patch";
+ hash = "sha256-tJ2M21i3geO9OsjUQKNatSXTkJ5U9qMT4RLNdJnyoKw=";
+ })
];
cmakeFlags = [
"-DMUSESCORE_BUILD_CONFIG=release"
+ # Disable the _usage_ of the `/bin/crashpad_handler` utility. See:
+ # https://github.com/musescore/MuseScore/pull/15577
+ "-DBUILD_CRASHPAD_CLIENT=OFF"
+ # Use our freetype
"-DUSE_SYSTEM_FREETYPE=ON"
];
@@ -34,13 +41,13 @@ mkDerivation rec {
"--set-default QT_QPA_PLATFORM xcb"
];
- nativeBuildInputs = [ cmake pkg-config ];
+ nativeBuildInputs = [ cmake pkg-config ninja ];
buildInputs = [
alsa-lib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis
- portaudio portmidi # tesseract
+ portaudio portmidi flac # tesseract
qtbase qtdeclarative qtgraphicaleffects qtquickcontrols2
- qtscript qtsvg qttools qtwebengine qtxmlpatterns
+ qtscript qtsvg qttools qtwebengine qtxmlpatterns qtnetworkauth qtx11extras
];
passthru.tests = nixosTests.musescore;
@@ -48,8 +55,10 @@ mkDerivation rec {
meta = with lib; {
description = "Music notation and composition software";
homepage = "https://musescore.org/";
- license = licenses.gpl2;
+ license = licenses.gpl3Only;
maintainers = with maintainers; [ vandenoever turion doronbehar ];
+ # Darwin requires CoreMIDI from SDK 11.3, we use the upstream built .dmg
+ # file in ./darwin.nix in the meantime.
platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch b/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
deleted file mode 100644
index 57a6092d5852..000000000000
--- a/pkgs/applications/audio/musescore/remove_qtwebengine_install_hack.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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)
--