2021-12-08 00:06:56 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, freetype
|
|
|
|
, libjack2
|
|
|
|
, lv2
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
2021-09-04 13:40:48 +00:00
|
|
|
}:
|
|
|
|
|
2021-12-08 00:06:56 +00:00
|
|
|
let
|
|
|
|
juce-lv2 = stdenv.mkDerivation {
|
|
|
|
pname = "juce-lv2";
|
2023-04-10 15:05:23 +00:00
|
|
|
version = "unstable-2022-03-30";
|
2021-12-08 00:06:56 +00:00
|
|
|
|
|
|
|
# lv2 branch
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lv2-porting-project";
|
|
|
|
repo = "JUCE";
|
2023-04-10 15:05:23 +00:00
|
|
|
rev = "e825ad977cf4499a7bfa05b97b208236f8fd253b";
|
|
|
|
sha256 = "sha256-Fqp1y9BN0E9p/12ukG1oh3COhXNRWBAlFRSl0LPyiFc=";
|
2021-12-08 00:06:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cp -r . $out
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
2021-09-04 13:40:48 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "surge-XT";
|
2023-04-10 15:05:23 +00:00
|
|
|
version = "1.2.0";
|
2021-09-04 13:40:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "surge-synthesizer";
|
|
|
|
repo = "surge";
|
2022-01-29 14:06:07 +00:00
|
|
|
rev = "release_xt_${version}";
|
2021-09-04 13:40:48 +00:00
|
|
|
fetchSubmodules = true;
|
2023-04-10 15:05:23 +00:00
|
|
|
sha256 = "sha256-LRYKkzeEuuRbMmvU3E0pHAnotOd4DyIJ7rTb+fpW0H4=";
|
2021-09-04 13:40:48 +00:00
|
|
|
};
|
|
|
|
|
2021-12-08 00:06:56 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-09-04 13:40:48 +00:00
|
|
|
|
2021-12-08 00:06:56 +00:00
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
freetype
|
|
|
|
libjack2
|
|
|
|
lv2
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DJUCE_SUPPORTS_LV2=ON"
|
|
|
|
"-DSURGE_JUCE_PATH=${juce-lv2}"
|
|
|
|
];
|
2021-09-04 13:40:48 +00:00
|
|
|
|
2021-12-08 00:06:56 +00:00
|
|
|
# JUCE dlopen's these at runtime, crashes without them
|
|
|
|
NIX_LDFLAGS = (toString [
|
|
|
|
"-lX11"
|
|
|
|
"-lXext"
|
|
|
|
"-lXcursor"
|
|
|
|
"-lXinerama"
|
|
|
|
"-lXrandr"
|
|
|
|
]);
|
|
|
|
|
|
|
|
# see https://github.com/NixOS/nixpkgs/pull/149487#issuecomment-991747333
|
|
|
|
postPatch = ''
|
|
|
|
export XDG_DOCUMENTS_DIR=$(mktemp -d)
|
|
|
|
'';
|
2021-09-04 13:40:48 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "LV2 & VST3 synthesizer plug-in (previously released as Vember Audio Surge)";
|
|
|
|
homepage = "https://surge-synthesizer.github.io";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ magnetophon orivej ];
|
|
|
|
};
|
|
|
|
}
|