lenmus: 5.4.2 -> 6.0.1

+45 -21
+45 -21
pkgs/applications/misc/lenmus/default.nix
··· 1 { lib 2 , stdenv 3 - , pkg-config 4 , fetchFromGitHub 5 , fetchpatch 6 , cmake 7 , boost 8 , portmidi 9 , sqlite ··· 11 , libpng 12 , pngpp 13 , zlib 14 - , wxGTK30 15 , wxsqlite3 16 }: 17 18 stdenv.mkDerivation rec { 19 pname = "lenmus"; 20 - version = "5.4.2"; 21 22 src = fetchFromGitHub { 23 owner = "lenmus"; 24 repo = "lenmus"; 25 rev = "Release_${version}"; 26 - sha256 = "1n639xr1qxx6rhqs0c6sjxp3bv8cwkmw1vfk1cji7514gj2a9v3p"; 27 }; 28 29 - patches = [ 30 - (fetchpatch { 31 - url = "https://github.com/lenmus/lenmus/commit/421760d84694a0e6e72d0e9b1d4fd30a7e129c6f.patch"; 32 - sha256 = "1z1wwh0pcr8w1zlr8swx99si9y2kxx5bmavgwvy6bvdhxgm58yqs"; 33 - }) 34 - (fetchpatch { 35 - url = "https://github.com/lenmus/lenmus/commit/6613d20d4051effc782203c9c6d92962a3f66b5f.patch"; 36 - sha256 = "01vvzzpamv90jpqbbq1f2m2b4gb9xab9z70am8i41d90nqvg6agn"; 37 - }) 38 - (fetchpatch { 39 - url = "https://github.com/lenmus/lenmus/commit/37ee8ac9c8faff65a14e8f7ed2bc22e6dc48d91f.patch"; 40 - includes = [ "src/app/lenmus_midi_wizard.cpp" ]; 41 - sha256 = "sha256-nlT6ZbSCIXUk2Ufv/SDn2A0Rt+s/7m+7l9HOoQmaIhc="; 42 - }) 43 - ]; 44 45 nativeBuildInputs = [ 46 cmake 47 pkg-config 48 ]; 49 50 buildInputs = [ ··· 55 libpng 56 pngpp 57 zlib 58 - wxGTK30 59 wxsqlite3 60 ]; 61 62 meta = with lib; { 63 description = "LenMus Phonascus is a program for learning music"; 64 longDescription = '' ··· 69 homepage = "http://www.lenmus.org/"; 70 license = licenses.gpl3Plus; 71 maintainers = with maintainers; [ ramkromberg ]; 72 - platforms = with platforms; linux; 73 }; 74 }
··· 1 { lib 2 , stdenv 3 , fetchFromGitHub 4 , fetchpatch 5 , cmake 6 + , pkg-config 7 + , makeWrapper 8 , boost 9 , portmidi 10 , sqlite ··· 12 , libpng 13 , pngpp 14 , zlib 15 + , wxGTK32 16 , wxsqlite3 17 + , fluidsynth 18 + , fontconfig 19 + , darwin 20 + , soundfont-fluid 21 + , openlilylib-fonts 22 }: 23 24 + let 25 + inherit (darwin.apple_sdk.frameworks) Cocoa; 26 + in 27 stdenv.mkDerivation rec { 28 pname = "lenmus"; 29 + version = "6.0.1"; 30 31 src = fetchFromGitHub { 32 owner = "lenmus"; 33 repo = "lenmus"; 34 rev = "Release_${version}"; 35 + sha256 = "sha256-qegOAc6vs2+6VViDHVjv0q+qjLZyTT7yPF3hFpTt5zE="; 36 }; 37 38 + postPatch = '' 39 + substituteInPlace CMakeLists.txt \ 40 + --replace "/usr" "${placeholder "out"}" 41 + sed -i 's/fixup_bundle.*")/")/g' CMakeLists.txt 42 + ''; 43 44 nativeBuildInputs = [ 45 cmake 46 pkg-config 47 + ] ++ lib.optionals stdenv.isDarwin [ 48 + makeWrapper 49 ]; 50 51 buildInputs = [ ··· 56 libpng 57 pngpp 58 zlib 59 + wxGTK32 60 wxsqlite3 61 + fluidsynth 62 + fontconfig 63 + ] ++ lib.optionals stdenv.isDarwin [ 64 + Cocoa 65 ]; 66 67 + preConfigure = '' 68 + mkdir res/fonts 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 71 + ''; 72 + 73 + cmakeFlags = [ 74 + "-DCMAKE_INSTALL_PREFIX=${placeholder "out"}" 75 + "-DLENMUS_INSTALL_SOUNDFONT=ON" 76 + "-DMAN_INSTALL_DIR=${placeholder "out"}/share/man" 77 + ]; 78 + 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 84 + ''; 85 + 86 meta = with lib; { 87 description = "LenMus Phonascus is a program for learning music"; 88 longDescription = '' ··· 93 homepage = "http://www.lenmus.org/"; 94 license = licenses.gpl3Plus; 95 maintainers = with maintainers; [ ramkromberg ]; 96 + platforms = with platforms; unix; 97 }; 98 }