2021-12-19 01:06:50 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, freetype
|
|
|
|
, libjack2
|
|
|
|
, lv2
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
2021-12-06 16:07:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "surge-XT";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.3.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "surge-synthesizer";
|
|
|
|
repo = "surge";
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "release_xt_${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
fetchSubmodules = true;
|
2024-05-15 15:35:15 +00:00
|
|
|
sha256 = "sha256-r8CZxjmH9lfCizc95jRB4je+R/74zMqRMlGIZxxxriw=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
freetype
|
|
|
|
libjack2
|
|
|
|
lv2
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
cmakeFlags = [
|
2024-04-21 15:54:59 +00:00
|
|
|
"-DSURGE_BUILD_LV2=TRUE"
|
2021-12-19 01:06:50 +00:00
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
CXXFLAGS = [
|
|
|
|
# GCC 13: error: 'uint32_t' has not been declared
|
|
|
|
"-include cstdint"
|
|
|
|
];
|
|
|
|
|
2021-12-19 01:06:50 +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-12-06 16:07:01 +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 ];
|
|
|
|
};
|
|
|
|
}
|