2020-02-09 10:26:45 +01:00
|
|
|
{ stdenv
|
|
|
|
, cmake
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
, which
|
|
|
|
, getopt
|
|
|
|
, python3
|
|
|
|
, pkg-config
|
|
|
|
, premake5
|
|
|
|
, libxkbcommon
|
|
|
|
, xorg
|
|
|
|
, cairo
|
|
|
|
, rsync
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
_version = "1.6.5";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
pname = "surge";
|
|
|
|
version = _version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "surge-synthesizer";
|
|
|
|
repo = "surge";
|
|
|
|
rev = "release_${_version}";
|
|
|
|
sha256 = "1gajlncl3pcxw9xii55sn29hf2bwcn6gs7npi4l664pkihnba0mx";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ncurses
|
|
|
|
which
|
|
|
|
getopt
|
|
|
|
python3
|
|
|
|
premake5
|
|
|
|
pkg-config
|
|
|
|
cmake
|
|
|
|
rsync
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo
|
|
|
|
libxkbcommon
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.xcbutilcursor
|
|
|
|
xorg.xcbutilkeysyms
|
|
|
|
];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
patchShebangs ./build-linux.sh
|
|
|
|
sed -i "s+/usr+$out+" build-linux.sh
|
2020-02-09 13:26:59 +01:00
|
|
|
sed -i "s+/usr+$out+" src/common/SurgeStorage.cpp
|
2020-02-09 10:26:45 +01:00
|
|
|
./build-linux.sh --help
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
# mkdir build
|
|
|
|
# cmake . -Bbuild
|
|
|
|
# make -j surge-headless -C build
|
|
|
|
# premake5 --cc=gcc --os=linux gmake2
|
|
|
|
# make -j config=release_x64 surge-vst3 surge-lv2 surge-vst2
|
2020-02-09 13:26:59 +01:00
|
|
|
|
2020-02-09 10:26:45 +01:00
|
|
|
# These appear to be the only supported projects
|
|
|
|
# https://github.com/surge-synthesizer/surge/blob/master/azure-pipelines.yml#L29
|
|
|
|
./build-linux.sh build --project=vst3
|
2020-02-09 13:52:28 +01:00
|
|
|
./build-linux.sh build --project=lv2
|
2020-02-09 10:26:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/Surge $out/lib/vst3 $out/lib/lv2
|
2020-02-09 13:34:36 +01:00
|
|
|
cp -r resources/data/* $out/share/Surge/
|
2020-02-09 10:26:45 +01:00
|
|
|
cp -r target/vst3/Release/Surge.so $out/lib/vst3/
|
|
|
|
cp -r target/lv2/Release/Surge.lv2 $out/lib/lv2/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-02-09 14:01:04 +01:00
|
|
|
description = "Synthesizer plug-in with wavetables, originally by Claes Johanson";
|
2020-02-09 10:26:45 +01:00
|
|
|
homepage = "https://surge-synthesizer.github.io";
|
|
|
|
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ jpotier ];
|
|
|
|
};
|
|
|
|
}
|