25 inherit (darwin.apple_sdk.frameworks) Cocoa;
27 stdenv.mkDerivation rec {
31 src = fetchFromGitHub {
34 rev = "Release_${version}";
35 sha256 = "sha256-qegOAc6vs2+6VViDHVjv0q+qjLZyTT7yPF3hFpTt5zE=";
39 substituteInPlace CMakeLists.txt \
40 --replace "/usr" "${placeholder "out"}"
41 sed -i 's/fixup_bundle.*")/")/g' CMakeLists.txt
47 ] ++ lib.optionals stdenv.isDarwin [
63 ] ++ lib.optionals stdenv.isDarwin [
69 ln -s ${openlilylib-fonts.bravura}/share/lilypond/*/fonts/otf/Bravura.otf res/fonts/Bravura.otf
70 ln -s ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 res/sounds/FluidR3_GM.sf2
74 "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}"
75 "-DLENMUS_INSTALL_SOUNDFONT=ON"
76 "-DMAN_INSTALL_DIR=${placeholder "out"}/share/man"
79 postInstall = lib.optionalString stdenv.isDarwin ''
80 mkdir -p $out/{Applications,bin}
81 mv $out/lenmus.app $out/Applications
82 mv $out/Resources $out/Applications/lenmus.app/Contents
83 makeWrapper $out/{Applications/lenmus.app/Contents/MacOS,bin}/lenmus
87 description = "LenMus Phonascus is a program for learning music";
89 LenMus Phonascus is a free open source program (GPL v3) for learning music.
90 It allows you to focus on specific skills and exercises, on both theory and aural training.
91 The different activities can be customized to meet your needs
93 homepage = "http://www.lenmus.org/";
94 license = licenses.gpl3Plus;
95 maintainers = with maintainers; [ ramkromberg ];
96 platforms = with platforms; unix;
97 mainProgram = "lenmus";