Add Surge synth

This commit is contained in:
EEva (JPotier) 2020-02-09 11:26:45 +02:00
parent 28acb0df25
commit 4d414a4d67
2 changed files with 84 additions and 0 deletions

View File

@ -24,6 +24,8 @@ self: super:
wineNoGS = super.wineStaging.override { gstreamerSupport = false; };
surge = super.callPackage ./surge {};
vim-samae = super.callPackage ./vim {};
reaper-samae = super.callPackage ./reaper {};

82
pkgs/surge/default.nix Normal file
View File

@ -0,0 +1,82 @@
{ 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 ];
};
}