surge: fix build
This commit is contained in:
parent
e0baa46fea
commit
018f0862ba
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, premake5, pkgconfig, cmake
|
{ stdenv, fetchFromGitHub, cmake, git, pkg-config, python3
|
||||||
,cairo, libxkbcommon, libxcb, xcb-util-cursor, xcbutilkeysyms, ncurses, which, getopt
|
, cairo, libsndfile, libxcb, libxkbcommon, xcbutil, xcbutilcursor, xcbutilkeysyms, zenity
|
||||||
,python, gnome3, lato, pcre, libpthreadstubs, libXdmcp, xcbutilrenderutil, xcbutilimage, libsndfile }:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "surge";
|
pname = "surge";
|
||||||
@ -10,49 +10,39 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "surge-synthesizer";
|
owner = "surge-synthesizer";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "release_${version}";
|
rev = "release_${version}";
|
||||||
sha256 = "1jhk8iaqh89dnci4446b47315v2lc8gclraygk8m9jl20zpjxl0l";
|
sha256 = "1b3ccc78vrpzy18w7070zfa250dnd1bww147xxcnj457vd6n065s";
|
||||||
|
leaveDotGit = true; # for SURGE_VERSION
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ premake5 pkgconfig cmake ncurses which getopt python ];
|
nativeBuildInputs = [ cmake git pkg-config python3 ];
|
||||||
|
buildInputs = [ cairo libsndfile libxcb libxkbcommon xcbutil xcbutilcursor xcbutilkeysyms zenity ];
|
||||||
|
|
||||||
buildInputs = [ cairo libxkbcommon libxcb xcb-util-cursor xcbutilkeysyms gnome3.zenity lato pcre libpthreadstubs libXdmcp xcbutilrenderutil xcbutilimage libsndfile ];
|
postPatch = ''
|
||||||
|
|
||||||
buildFlags = [ "config=release_x64" ];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
patchPhase = ''
|
|
||||||
patchShebangs build-linux.sh
|
|
||||||
substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge"
|
substituteInPlace src/common/SurgeStorage.cpp --replace "/usr/share/Surge" "$out/share/surge"
|
||||||
substituteInPlace src/linux/UserInteractionsLinux.cpp --replace 'execlp("zenity"' 'execlp("${gnome3.zenity}/bin/zenity"'
|
substituteInPlace src/common/gui/PopupEditorDialog.cpp --replace '"zenity' '"${zenity}/bin/zenity'
|
||||||
substituteInPlace src/common/gui/PopupEditorDialog.cpp --replace zenity ${gnome3.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
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
./build-linux.sh build;
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/lib/lv2
|
mkdir -p $out/lib/lv2 $out/lib/vst3 $out/share/surge
|
||||||
cp -r buildlin/surge_products/Surge.lv2/ $out/lib/lv2
|
cp -r surge_products/Surge.lv2 $out/lib/lv2/
|
||||||
mkdir -p $out/lib/vst3
|
cp -r surge_products/Surge.vst3 $out/lib/vst3/
|
||||||
cp -r buildlin/surge_products/Surge.vst3/ $out/lib/vst3
|
cp -r ../resources/data/* $out/share/surge/
|
||||||
mkdir -p $out/share/surge
|
|
||||||
cp -r resources/data/* $out/share/surge/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
./build-linux.sh build -p headless
|
cd ..
|
||||||
./buildlin/surge-headless
|
build/surge-headless
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "LV2 & VST Synthesizer plug-in (previously released as Vember Audio Surge)";
|
description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
|
||||||
homepage = "https://surge-synthesizer.github.io";
|
homepage = "https://surge-synthesizer.github.io";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
maintainers = with maintainers; [ magnetophon ];
|
maintainers = with maintainers; [ magnetophon orivej ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -23135,7 +23135,10 @@ in
|
|||||||
|
|
||||||
surf-display = callPackage ../desktops/surf-display { };
|
surf-display = callPackage ../desktops/surf-display { };
|
||||||
|
|
||||||
surge = callPackage ../applications/audio/surge { };
|
surge = callPackage ../applications/audio/surge {
|
||||||
|
inherit (gnome3) zenity;
|
||||||
|
git = gitMinimal;
|
||||||
|
};
|
||||||
|
|
||||||
sunvox = callPackage ../applications/audio/sunvox { };
|
sunvox = callPackage ../applications/audio/sunvox { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user