nixpkgs/pkgs/applications/audio/sonic-pi/default.nix

70 lines
1.3 KiB
Nix
Raw Normal View History

2015-11-15 20:16:00 +00:00
{ stdenv
, fetchFromGitHub
, qscintilla
, supercollider
, ruby
, cmake
, pkgconfig
, qt48Full
, bash
, makeWrapper
}:
stdenv.mkDerivation rec {
version = "2.9.0";
2015-11-15 20:16:00 +00:00
name = "sonic-pi-${version}";
src = fetchFromGitHub {
owner = "samaaron";
repo = "sonic-pi";
rev = "v${version}";
sha256 = "19db5dxrf6h1v2w3frds5g90nb6izd9ppp7cs2xi6i0m67l6jrwb";
2015-11-15 20:16:00 +00:00
};
buildInputs = [
bash
cmake
2015-11-15 20:16:00 +00:00
makeWrapper
pkgconfig
qscintilla
qt48Full
ruby
supercollider
2015-11-15 20:16:00 +00:00
];
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 \
--subst-var-by ruby "${ruby}/bin/ruby" \
--subst-var out
'';
2015-11-15 20:16:00 +00:00
buildPhase = ''
pushd app/server/bin
./compile-extensions.rb
2015-11-15 20:16:00 +00:00
popd
pushd app/gui/qt
./rp-build-app
2015-11-15 20:16:00 +00:00
popd
'';
installPhase = ''
cp -r . $out
wrapProgram $out/bin/sonic-pi --prefix PATH : \
${ruby}/bin:${bash}/bin
'';
}