Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions pkgs/applications/audio/musescore/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{ stdenv, fetchurl, alsaLib, cmake, freetype, jackaudio, libsndfile
, pkgconfig, portaudio, qt4 }:

stdenv.mkDerivation rec {
version = "1.2";
name = "musescore-${version}";

src = fetchurl {
url = "mirror://sourceforge/mscore/mscore-${version}-nopdf.tar.bz2";
sha256 = "05h2ika0qyqa5xd03nd45acsfpq8brkd5b4ca4n6n7cljyb0sjrc";
};

buildInputs =
[ alsaLib cmake freetype libsndfile pkgconfig portaudio qt4
jackaudio ];

# Thanks Gentoo!
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/musescore/files/musescore-1.2-cflags.patch
patches = [ ./musescore-1.2-cflags.patch ];

preConfigure = ''
cd mscore
sed -e "s@/usr/include/freetype2@${freetype}/include/freetype2@" \
-i mscore/CMakeLists.txt
'';

buildPhase = "make -f Makefile";

installPhase = ''
mkdir -p $out/bin
cp mscore/mscore $out/bin
mkdir -p $out/share/mscore-1.2
cp -r share/* $out/share/mscore-1.2/
'';

meta = with stdenv.lib; {
description = "Music composition & notation software";
homepage = http://musescore.org;
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}
64 changes: 64 additions & 0 deletions pkgs/applications/audio/musescore/musescore-1.2-cflags.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
--- mscore-1.2/mscore/al/CMakeLists.txt
+++ mscore-1.2/mscore/al/CMakeLists.txt
@@ -42,7 +42,7 @@

set_source_files_properties(
dsp.cpp xml.cpp tempo.cpp sig.cpp pos.cpp fraction.cpp
- PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -g -Wall -Wextra -Winvalid-pch"
+ PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h -Wall -Wextra -Winvalid-pch"
)

set_source_files_properties(dspSSE.cpp
--- mscore-1.2/mscore/awl/CMakeLists.txt
+++ mscore-1.2/mscore/awl/CMakeLists.txt
@@ -61,7 +61,7 @@

set_target_properties( awl
PROPERTIES COMPILE_FLAGS
- "-include ${PROJECT_BINARY_DIR}/all.h -g -Wall -Wextra -Winvalid-pch"
+ "-include ${PROJECT_BINARY_DIR}/all.h -Wall -Wextra -Winvalid-pch"
)

ADD_DEPENDENCIES(awl mops1)
--- mscore-1.2/mscore/CMakeLists.txt
+++ mscore-1.2/mscore/CMakeLists.txt
@@ -253,9 +253,6 @@
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)

-set(CMAKE_CXX_FLAGS_DEBUG "")
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
-
if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if (MINGW)
set(FLAGS -DQT_DEBUG -DQT_DLL)
@@ -264,9 +261,9 @@
endif (MINGW)
else (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if (MINGW)
- set(FLAGS -O2 -DNDEBUG -DQT_DLL -DQT_NO_DEBUG)
+ set(FLAGS -DNDEBUG -DQT_DLL -DQT_NO_DEBUG)
else (MINGW)
- set(FLAGS -O2 -DNDEBUG -DQT_NO_DEBUG)
+ set(FLAGS -DNDEBUG -DQT_NO_DEBUG)
endif (MINGW)
endif (CMAKE_BUILD_TYPE STREQUAL "DEBUG")

@@ -276,7 +273,7 @@
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/all.h.pch
COMMAND ${CMAKE_CXX_COMPILER}
- -x c++-header -g ${FLAGS}
+ -x c++-header ${FLAGS}
-I${QT_INCLUDE_DIR}
-o all.h.pch all.h
DEPENDS ${PROJECT_BINARY_DIR}/all.h
@@ -287,7 +284,7 @@
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/all.h.gch
COMMAND ${CMAKE_CXX_COMPILER}
- -x c++-header -g ${FLAGS} -m32
+ -x c++-header ${FLAGS}
-I${QT_HEADERS_DIR}
-o all.h.gch all.h
DEPENDS ${PROJECT_BINARY_DIR}/all.h
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7110,6 +7110,8 @@ let
jackSupport = getConfig [ "mumble" "jackSupport" ] false;
};

musescore = callPackage ../applications/audio/musescore { };

mutt = callPackage ../applications/networking/mailreaders/mutt { };

msmtp = callPackage ../applications/networking/msmtp { };
Expand Down