@@ -1,59 +1,37 @@
1−{ stdenv, fetchzip, cmake, pkgconfig
1+{ stdenv, lib, fetchFromGitHub, cmake, pkgconfig
22, alsaLib, freetype, libjack2, lame, libogg, libpulseaudio, libsndfile, libvorbis
3−, portaudio, qtbase, qtdeclarative, qtscript, qtsvg, qttools
3+, portaudio, portmidi, qtbase, qtdeclarative, qtscript, qtsvg, qttools
44, qtwebkit, qtxmlpatterns
55}:
66
77stdenv.mkDerivation rec {
88 name = "musescore-${version}";
9− version = "2.1.0";
9+ version = "2.2.1";
1010
11− src = fetchzip {
12− url = "https://github.com/musescore/MuseScore/archive/v${version}.tar.gz";
13− sha256 = "1rlxz2nzilz7n6c0affnjk2wcxl4b8949qxs0xi555gxg01kybls";
11+ src = fetchFromGitHub {
12+ owner = "musescore";
13+ repo = "MuseScore";
14+ rev = "v${version}";
15+ sha256 = "00lwcsnpyiq9l9x11nm24mzf67xmhzjhwi4c3iqry6ayi9c4p4qs";
1416 };
1517
16− hardeningDisable = [ "relro" "bindnow" ];
17−
18− makeFlags = [
19− "PREFIX=$(out)"
20− ];
21−
2218 cmakeFlags = [
23− "-DAEOLUS=OFF"
24− "-DZERBERUS=ON"
25− "-DOSC=ON=ON"
26− "-DOMR=OFF" # TODO: add OMR support, CLEF_G not declared error
27− "-DOCR=OFF" # Not necessary without OMR
28− "-DSOUNDFONT3=ON"
29− "-DHAS_AUDIOFILE=ON"
30− "-DBUILD_JACK=ON"
31− ];
32−
33− preBuild = ''
34− make lrelease
35− '';
36−
37− postBuild = ''
38− make manpages
39− '';
19+ ] ++ lib.optional (lib.versionAtLeast freetype.version "2.5.2") "-DUSE_SYSTEM_FREETYPE=ON";
4020
4121 nativeBuildInputs = [ cmake pkgconfig ];
4222
43− enableParallelBuilding = true;
44−
4523 buildInputs = [
4624 alsaLib libjack2 freetype lame libogg libpulseaudio libsndfile libvorbis
47− portaudio qtbase qtdeclarative qtscript qtsvg qttools
48− qtwebkit qtxmlpatterns #tesseract
25+ portaudio portmidi # tesseract
26+ qtbase qtdeclarative qtscript qtsvg qttools qtwebkit qtxmlpatterns
4927 ];
5028
5129 meta = with stdenv.lib; {
5230 description = "Music notation and composition software";
5331 homepage = https://musescore.org/;
5432 license = licenses.gpl2;
33+ maintainers = with maintainers; [ vandenoever ];
5534 platforms = platforms.linux;
56− maintainers = [ maintainers.vandenoever ];
5735 repositories.git = https://github.com/musescore/MuseScore;
5836 };
5937}