nixpkgs/pkgs/applications/audio/surge/default.nix

49 lines
1.7 KiB
Nix
Raw Normal View History

2020-09-02 05:05:52 +01:00
{ stdenv, fetchFromGitHub, cmake, git, pkg-config, python3
, cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity
}:
2020-03-11 09:05:29 +00:00
stdenv.mkDerivation rec {
pname = "surge";
2020-08-28 12:47:04 +01:00
version = "1.7.1";
2020-03-11 09:05:29 +00:00
src = fetchFromGitHub {
owner = "surge-synthesizer";
repo = pname;
rev = "release_${version}";
2020-09-02 05:05:52 +01:00
sha256 = "1b3ccc78vrpzy18w7070zfa250dnd1bww147xxcnj457vd6n065s";
leaveDotGit = true; # for SURGE_VERSION
2020-03-11 09:05:29 +00:00
fetchSubmodules = true;
};
2020-09-02 05:05:52 +01:00
nativeBuildInputs = [ cmake git pkg-config python3 ];
buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity ];
2020-03-11 09:05:29 +00:00
2020-09-02 05:05:52 +01:00
postPatch = ''
2020-03-11 09:05:29 +00:00
substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge"
2020-09-02 05:05:52 +01:00
substituteInPlace src/common/gui/PopupEditorDialog.cpp --replace '"zenity' '"${zenity}/bin/zenity'
substituteInPlace src/linux/UserInteractionsLinux.cpp --replace '"zenity' '"${zenity}/bin/zenity'
substituteInPlace vstgui.surge/vstgui/lib/platform/linux/x11fileselector.cpp --replace /usr/bin/zenity ${zenity}/bin/zenity
2020-08-28 12:47:04 +01:00
'';
2020-03-11 09:05:29 +00:00
installPhase = ''
2020-09-02 05:05:52 +01:00
mkdir -p $out/lib/lv2 $out/lib/vst3 $out/share/surge
cp -r surge_products/Surge.lv2 $out/lib/lv2/
cp -r surge_products/Surge.vst3 $out/lib/vst3/
cp -r ../resources/data/* $out/share/surge/
2020-03-11 09:05:29 +00:00
'';
doInstallCheck = true;
installCheckPhase = ''
2020-09-02 05:05:52 +01:00
cd ..
build/surge-headless
2020-03-11 09:05:29 +00:00
'';
meta = with stdenv.lib; {
2020-09-02 05:05:52 +01:00
description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
2020-03-11 09:05:29 +00:00
homepage = "https://surge-synthesizer.github.io";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
2020-09-02 05:05:52 +01:00
maintainers = with maintainers; [ magnetophon orivej ];
2020-03-11 09:05:29 +00:00
};
}