sonic-pi: 2.9.0 -> 3.0.1
This commit is contained in:
parent
a05f1e2ec4
commit
7525a3c89f
@ -1,24 +1,33 @@
|
|||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, qscintilla
|
, fftwSinglePrec
|
||||||
, supercollider
|
|
||||||
, ruby
|
, ruby
|
||||||
|
, libffi
|
||||||
|
, aubio
|
||||||
, cmake
|
, cmake
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, qt48Full
|
, qt5
|
||||||
|
, libsForQt5
|
||||||
|
, boost
|
||||||
, bash
|
, bash
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
, jack2Full
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
version = "2.9.0";
|
supercollider = libsForQt5.callPackage ../../../development/interpreters/supercollider {
|
||||||
|
fftw = fftwSinglePrec;
|
||||||
|
};
|
||||||
|
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
version = "3.0.1";
|
||||||
name = "sonic-pi-${version}";
|
name = "sonic-pi-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "samaaron";
|
owner = "samaaron";
|
||||||
repo = "sonic-pi";
|
repo = "sonic-pi";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "19db5dxrf6h1v2w3frds5g90nb6izd9ppp7cs2xi6i0m67l6jrwb";
|
sha256 = "1l1892hijp1dj2h799sfjr699q6xp660n0siibab5kv238521a81";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -26,24 +35,18 @@ stdenv.mkDerivation rec {
|
|||||||
cmake
|
cmake
|
||||||
makeWrapper
|
makeWrapper
|
||||||
pkgconfig
|
pkgconfig
|
||||||
qscintilla
|
qt5.qtbase
|
||||||
qt48Full
|
libsForQt5.qscintilla
|
||||||
|
libsForQt5.qwt
|
||||||
ruby
|
ruby
|
||||||
|
libffi
|
||||||
|
aubio
|
||||||
supercollider
|
supercollider
|
||||||
|
boost
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
|
||||||
homepage = http://sonic-pi.net/;
|
|
||||||
description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
|
|
||||||
license = stdenv.lib.licenses.mit;
|
|
||||||
maintainers = [ stdenv.lib.maintainers.Phlogistique ];
|
|
||||||
platforms = stdenv.lib.platforms.linux;
|
|
||||||
};
|
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
dontUseCmakeConfigure = true;
|
||||||
|
|
||||||
patches = [ ./fixed-prefixes.patch ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
substituteInPlace app/gui/qt/mainwindow.cpp \
|
substituteInPlace app/gui/qt/mainwindow.cpp \
|
||||||
@ -52,18 +55,45 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
export SONIC_PI_HOME=$TMPDIR
|
||||||
|
export AUBIO_LIB=${aubio}/lib/libaubio.so
|
||||||
|
|
||||||
pushd app/server/bin
|
pushd app/server/bin
|
||||||
./compile-extensions.rb
|
./compile-extensions.rb
|
||||||
|
./i18n-tool.rb -t
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd app/gui/qt
|
pushd app/gui/qt
|
||||||
./rp-build-app
|
cp -f ruby_help.tmpl ruby_help.h
|
||||||
|
../../server/bin/qt-doc.rb -o ruby_help.h
|
||||||
|
|
||||||
|
substituteInPlace SonicPi.pro \
|
||||||
|
--replace "LIBS += -lrt -lqt5scintilla2" \
|
||||||
|
"LIBS += -lrt -lqscintilla2 -lqwt"
|
||||||
|
|
||||||
|
lrelease SonicPi.pro
|
||||||
|
qmake SonicPi.pro
|
||||||
|
|
||||||
|
make
|
||||||
popd
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
cp -r . $out
|
cp -r . $out
|
||||||
wrapProgram $out/bin/sonic-pi --prefix PATH : \
|
wrapProgram $out/bin/sonic-pi \
|
||||||
${ruby}/bin:${bash}/bin
|
--prefix PATH : ${ruby}/bin:${bash}/bin:${supercollider}/bin:${jack2Full}/bin \
|
||||||
|
--set AUBIO_LIB "${aubio}/lib/libaubio.so"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = http://sonic-pi.net/;
|
||||||
|
description = "Free live coding synth for everyone originally designed to support computing and music lessons within schools";
|
||||||
|
license = stdenv.lib.licenses.mit;
|
||||||
|
maintainers = with stdenv.lib.maintainers; [ Phlogistique kamilchm ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
diff --git a/app/gui/qt/mainwindow.cpp b/app/gui/qt/mainwindow.cpp
|
|
||||||
index 0af6cf7..97c17ad 100644
|
|
||||||
--- a/app/gui/qt/mainwindow.cpp
|
|
||||||
+++ b/app/gui/qt/mainwindow.cpp
|
|
||||||
@@ -677,28 +677,9 @@ void MainWindow::startServer(){
|
|
||||||
|
|
||||||
serverProcess = new QProcess();
|
|
||||||
|
|
||||||
- QString root = rootPath();
|
|
||||||
-
|
|
||||||
- #if defined(Q_OS_WIN)
|
|
||||||
- QString prg_path = root + "/app/server/native/windows/ruby/bin/ruby.exe";
|
|
||||||
- QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb";
|
|
||||||
- sample_path = root + "/etc/samples";
|
|
||||||
- #elif defined(Q_OS_MAC)
|
|
||||||
- QString prg_path = root + "/server/native/osx/ruby/bin/ruby";
|
|
||||||
- QString prg_arg = root + "/server/bin/sonic-pi-server.rb";
|
|
||||||
- sample_path = root + "/etc/samples";
|
|
||||||
- #else
|
|
||||||
- //assuming Raspberry Pi
|
|
||||||
- QString prg_path = root + "/app/server/native/raspberry/ruby/bin/ruby";
|
|
||||||
- QFile file(prg_path);
|
|
||||||
- if(!file.exists()) {
|
|
||||||
- // use system ruby if bundled ruby doesn't exist
|
|
||||||
- prg_path = "/usr/bin/ruby";
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- QString prg_arg = root + "/app/server/bin/sonic-pi-server.rb";
|
|
||||||
- sample_path = root + "/etc/samples";
|
|
||||||
- #endif
|
|
||||||
+ QString prg_path = "@ruby@";
|
|
||||||
+ QString prg_arg = "@out@/app/server/bin/sonic-pi-server.rb";
|
|
||||||
+ sample_path = "@out@/etc/samples";
|
|
||||||
|
|
||||||
prg_path = QDir::toNativeSeparators(prg_path);
|
|
||||||
prg_arg = QDir::toNativeSeparators(prg_arg);
|
|
@ -16376,7 +16376,7 @@ with pkgs;
|
|||||||
viber = callPackage ../applications/networking/instant-messengers/viber { };
|
viber = callPackage ../applications/networking/instant-messengers/viber { };
|
||||||
|
|
||||||
sonic-pi = callPackage ../applications/audio/sonic-pi {
|
sonic-pi = callPackage ../applications/audio/sonic-pi {
|
||||||
ruby = ruby_2_2;
|
ruby = ruby_2_3;
|
||||||
};
|
};
|
||||||
|
|
||||||
st = callPackage ../applications/misc/st {
|
st = callPackage ../applications/misc/st {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user