83 lines
1.7 KiB
Nix
83 lines
1.7 KiB
Nix
|
{ 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
|
||
|
./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
|
||
|
# 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=lv2
|
||
|
./build-linux.sh build --project=vst3
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out/share/Surge $out/lib/vst3 $out/lib/lv2
|
||
|
cp -r resources/data $out/share/Surge/
|
||
|
cp -r target/vst3/Release/Surge.so $out/lib/vst3/
|
||
|
cp -r target/lv2/Release/Surge.lv2 $out/lib/lv2/
|
||
|
'';
|
||
|
|
||
|
meta = with stdenv.lib; {
|
||
|
description = "Synthesizer plug-in originally by Claes Johanson";
|
||
|
homepage = "https://surge-synthesizer.github.io";
|
||
|
|
||
|
license = licenses.gpl3;
|
||
|
platforms = [ "x86_64-linux" ];
|
||
|
maintainers = with maintainers; [ jpotier ];
|
||
|
};
|
||
|
}
|