diff --git a/pkgs/applications/audio/sonic-pi/default.nix b/pkgs/applications/audio/sonic-pi/default.nix index 534ea135880..d80632a08f5 100644 --- a/pkgs/applications/audio/sonic-pi/default.nix +++ b/pkgs/applications/audio/sonic-pi/default.nix @@ -4,7 +4,6 @@ , fetchFromGitHub , fftwSinglePrec , ruby -, libffi , aubio , cmake , pkgconfig @@ -12,7 +11,6 @@ , bash , jack2Full , supercollider -, qscintilla , qwt , osmid }: @@ -24,14 +22,14 @@ let in mkDerivation rec { - version = "3.1.0"; + version = "3.2.2"; pname = "sonic-pi"; src = fetchFromGitHub { owner = "samaaron"; repo = "sonic-pi"; rev = "v${version}"; - sha256 = "0gi4a73szaa8iz5q1gxgpsnyvhhghcfqm6bfwwxbix4m5csbfgh9"; + sha256 = "1nlkpkpg9iz2hvf5pymvk6lqhpdpjbdrvr0hrnkc3ymj7llvf1cm"; }; buildInputs = [ @@ -39,10 +37,8 @@ mkDerivation rec { cmake pkgconfig qtbase - qscintilla qwt ruby - libffi aubio supercollider_single_prec boost @@ -71,23 +67,34 @@ mkDerivation rec { popd pushd app/gui/qt - cp -f ruby_help.tmpl ruby_help.h - ../../server/ruby/bin/qt-doc.rb -o ruby_help.h + cp -f utils/ruby_help.tmpl utils/ruby_help.h + ../../server/ruby/bin/qt-doc.rb -o utils/ruby_help.h - substituteInPlace SonicPi.pro \ - --replace "LIBS += -lrt -lqt5scintilla2" \ - "LIBS += -lrt -lqscintilla2 -lqwt" + lrelease lang/*.ts - lrelease SonicPi.pro - qmake SonicPi.pro - - make + mkdir build + pushd build + cmake -G "Unix Makefiles" .. + make + popd popd ''; installPhase = '' runHook preInstall - cp -r . $out + + mkdir $out + cp -r {bin,etc} $out/ + + # Copy server whole. + mkdir -p $out/app + cp -r app/server $out/app/ + + # Copy only necessary files for the gui app. + mkdir -p $out/app/gui/qt/build + cp -r app/gui/qt/{book,fonts,help,html,images,image_source,info,lang,theme} $out/app/gui/qt/ + cp app/gui/qt/build/sonic-pi $out/app/gui/qt/build/sonic-pi + runHook postInstall ''; @@ -103,9 +110,7 @@ mkDerivation rec { homepage = "https://sonic-pi.net/"; description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools"; license = lib.licenses.mit; - maintainers = with lib.maintainers; [ Phlogistique kamilchm ]; + maintainers = with lib.maintainers; [ Phlogistique kamilchm c0deaddict ]; platforms = lib.platforms.linux; - # sonic-pi depends on ruby 2.4 which we don't support anymore - broken = true; }; }