about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBart Brouns <bart@magnetophon.nl>2020-03-11 10:05:29 +0100
committerOrivej Desh <orivej@gmx.fr>2020-09-02 04:56:57 +0000
commitf68e68497fa6e44a6b7e6e24be918eb94e4025c4 (patch)
treeff6fc071128dd6dda97058e9d4de16ef2ccb0331 /pkgs
parent1a68e21d474c5d6005812459c9bce28168625384 (diff)
surge: init at 1.6.6
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/audio/surge/default.nix59
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/applications/audio/surge/default.nix b/pkgs/applications/audio/surge/default.nix
new file mode 100644
index 0000000000000..014134c43fb73
--- /dev/null
+++ b/pkgs/applications/audio/surge/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchFromGitHub, premake5, pkgconfig, cmake
+,cairo, libxkbcommon, libxcb, xcb-util-cursor, xcbutilkeysyms, ncurses, which, getopt
+,python, gnome3, lato }:
+
+stdenv.mkDerivation rec {
+  pname = "surge";
+  version = "1.6.6";
+
+  src = fetchFromGitHub {
+    owner = "surge-synthesizer";
+    repo = pname;
+    rev = "release_${version}";
+    sha256 = "0al021f516ybhnp3lhqx8i6c6hpfaw3gqfwwxx3lx3hh4b8kjfjw";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ premake5 pkgconfig cmake ncurses which getopt python ];
+
+  buildInputs = [  cairo libxkbcommon libxcb xcb-util-cursor xcbutilkeysyms gnome3.zenity lato ];
+
+  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/linux/UserInteractionsLinux.cpp --replace 'execlp("zenity"' 'execlp("${gnome3.zenity}/bin/zenity"'
+    substituteInPlace src/common/gui/PopupEditorDialog.cpp --replace zenity ${gnome3.zenity}/bin/zenity
+  '';
+
+  configurePhase = ''
+      ./build-linux.sh premake
+      python scripts/linux/emit-vector-piggy.py .
+    '';
+
+  installPhase = ''
+    mkdir -p $out/lib/lv2
+    cp -r target/lv2/Release/Surge.lv2/ $out/lib/lv2
+    mkdir -p $out/lib/vst
+    cp target/vst3/Release/Surge.so $out/lib/vst
+    mkdir -p $out/share/surge
+    cp -r resources/data/* $out/share/surge/
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    ./build-linux.sh build -p headless
+    ./target/headless/Release/Surge/Surge-Headless
+  '';
+
+  meta = with stdenv.lib; {
+    description = "LV2 & VST 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 ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 85a8dadf4d994..49c7c45ae274f 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -23135,6 +23135,8 @@ in
 
   surf-display = callPackage ../desktops/surf-display { };
 
+  surge = callPackage ../applications/audio/surge { };
+
   sunvox = callPackage ../applications/audio/sunvox { };
 
   swh_lv2 = callPackage ../applications/audio/swh-lv2 { };