about summary refs log tree commit diff
path: root/pkgs/applications/audio/bespokesynth
diff options
context:
space:
mode:
authorPowerUser64 <blake@blakenorth.net>2023-07-10 02:49:25 -0700
committerPowerUser64 <blake@blakenorth.net>2023-08-26 13:10:36 -0700
commitbc42935fe312aeda06b407ba02d15876f8c874e5 (patch)
treea168c187566a1d3d1a0d813997d0032a4cb804dd /pkgs/applications/audio/bespokesynth
parent34b3a809efcd30bf1508cd246af4e9d0c6357259 (diff)
bespokesynth: 1.1.0 -> unstable-2023-08-17
Co-authored-by: Christoph Neidahl <christoph.neidahl@gmail.com>
Co-authored-by: Tobias Bora <tobias.bora.list@gmail.com>
Diffstat (limited to 'pkgs/applications/audio/bespokesynth')
-rw-r--r--pkgs/applications/audio/bespokesynth/default.nix34
1 files changed, 18 insertions, 16 deletions
diff --git a/pkgs/applications/audio/bespokesynth/default.nix b/pkgs/applications/audio/bespokesynth/default.nix
index ad19192ce70c0..92d7297ec8448 100644
--- a/pkgs/applications/audio/bespokesynth/default.nix
+++ b/pkgs/applications/audio/bespokesynth/default.nix
@@ -36,6 +36,7 @@
 , CoreServices
 , CoreAudioKit
 , IOBluetooth
+, MetalKit
   # It is not allowed to distribute binaries with the VST2 SDK plugin without a license
   # (the author of Bespoke has such a licence but not Nix). VST3 should work out of the box.
   # Read more in https://github.com/NixOS/nixpkgs/issues/145607
@@ -58,20 +59,16 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "bespokesynth";
-  version = "1.1.0";
+  version = "unstable-2023-08-17";
 
   src = fetchFromGitHub {
     owner = "BespokeSynth";
     repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-PN0Q6/gI1PeMaF/8EZFGJdLR8JVHQZfWunAhOIQxkHw=";
+    rev = "c6b1410afefc8b0b9aeb4aa11ad5c32651879c9f";
+    hash = "sha256-MLHlHSszD2jEN4/f2jC4vjAidr3gVOSK606qs5bq+Sc=";
     fetchSubmodules = true;
   };
 
-  postPatch = ''
-    sed '1i#include <memory>' -i Source/TitleBar.h # gcc12
-  '';
-
   cmakeBuildType = "Release";
 
   cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ];
@@ -79,7 +76,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ python3 makeWrapper cmake pkg-config ninja ];
 
   buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
-    # List obtained in https://github.com/BespokeSynth/BespokeSynth/blob/main/azure-pipelines.yml
+    # List obtained from https://github.com/BespokeSynth/BespokeSynth/blob/main/azure-pipelines.yml
     libX11
     libXrandr
     libXinerama
@@ -110,6 +107,7 @@ stdenv.mkDerivation rec {
     CoreServices
     CoreAudioKit
     IOBluetooth
+    MetalKit
   ];
 
   env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
@@ -133,23 +131,27 @@ stdenv.mkDerivation rec {
         --prefix PATH : '${lib.makeBinPath [
           gnome.zenity
           (python3.withPackages (ps: with ps; [ jedi ]))
-        ]}' \
-        --prefix LD_LIBRARY_PATH : '${lib.makeLibraryPath [
-          libXrandr
-          libXinerama
-          libXcursor
-          libXScrnSaver
         ]}'
     '';
 
+  env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-rpath ${lib.makeLibraryPath ([
+    libX11
+    libXrandr
+    libXinerama
+    libXext
+    libXcursor
+    libXScrnSaver
+  ])}";
+  dontPatchELF = true; # needed or nix will try to optimize the binary by removing "useless" rpath
+
   meta = with lib; {
     description =
       "Software modular synth with controllers support, scripting and VST";
-    homepage = "https://github.com/awwbees/BespokeSynth";
+    homepage = "https://www.bespokesynth.com/";
     license = with licenses; [
       gpl3Plus
     ] ++ lib.optional enableVST2 unfree;
-    maintainers = with maintainers; [ astro tobiasBora OPNA2608 ];
+    maintainers = with maintainers; [ astro tobiasBora OPNA2608 PowerUser64 ];
     mainProgram = "BespokeSynth";
     platforms = platforms.all;
   };