mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
Merge pull request #30131 from kamilchm/sonic-pi
sonic-pi: 2.9.0 -> 3.0.1
This commit is contained in:
commit
2a0264e058
@ -1,24 +1,33 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, qscintilla
|
||||
, supercollider
|
||||
, fftwSinglePrec
|
||||
, ruby
|
||||
, libffi
|
||||
, aubio
|
||||
, cmake
|
||||
, pkgconfig
|
||||
, qt48Full
|
||||
, qt5
|
||||
, libsForQt5
|
||||
, boost
|
||||
, bash
|
||||
, makeWrapper
|
||||
, jack2Full
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.9.0";
|
||||
let
|
||||
supercollider = libsForQt5.callPackage ../../../development/interpreters/supercollider {
|
||||
fftw = fftwSinglePrec;
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "3.0.1";
|
||||
name = "sonic-pi-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "samaaron";
|
||||
repo = "sonic-pi";
|
||||
rev = "v${version}";
|
||||
sha256 = "19db5dxrf6h1v2w3frds5g90nb6izd9ppp7cs2xi6i0m67l6jrwb";
|
||||
sha256 = "1l1892hijp1dj2h799sfjr699q6xp660n0siibab5kv238521a81";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -26,24 +35,18 @@ stdenv.mkDerivation rec {
|
||||
cmake
|
||||
makeWrapper
|
||||
pkgconfig
|
||||
qscintilla
|
||||
qt48Full
|
||||
qt5.qtbase
|
||||
libsForQt5.qscintilla
|
||||
libsForQt5.qwt
|
||||
ruby
|
||||
libffi
|
||||
aubio
|
||||
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;
|
||||
|
||||
patches = [ ./fixed-prefixes.patch ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs .
|
||||
substituteInPlace app/gui/qt/mainwindow.cpp \
|
||||
@ -52,18 +55,45 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export SONIC_PI_HOME=$TMPDIR
|
||||
export AUBIO_LIB=${aubio}/lib/libaubio.so
|
||||
|
||||
pushd app/server/bin
|
||||
./compile-extensions.rb
|
||||
./i18n-tool.rb -t
|
||||
popd
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp -r . $out
|
||||
wrapProgram $out/bin/sonic-pi --prefix PATH : \
|
||||
${ruby}/bin:${bash}/bin
|
||||
wrapProgram $out/bin/sonic-pi \
|
||||
--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 { };
|
||||
|
||||
sonic-pi = callPackage ../applications/audio/sonic-pi {
|
||||
ruby = ruby_2_2;
|
||||
ruby = ruby_2_3;
|
||||
};
|
||||
|
||||
st = callPackage ../applications/misc/st {
|
||||
|
Loading…
Reference in New Issue
Block a user