Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bespokesynth: update to latest commit #242698

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions pkgs/applications/audio/bespokesynth/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -58,28 +59,24 @@ 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" ];

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
Expand Down Expand Up @@ -110,6 +107,7 @@ stdenv.mkDerivation rec {
CoreServices
CoreAudioKit
IOBluetooth
MetalKit
];

env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
Expand All @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30035,8 +30035,8 @@ with pkgs;

berry = callPackage ../applications/window-managers/berry { };

bespokesynth = callPackage ../applications/audio/bespokesynth {
inherit (darwin.apple_sdk.frameworks) Accelerate Cocoa WebKit CoreServices CoreAudioKit IOBluetooth;
bespokesynth = darwin.apple_sdk_11_0.callPackage ../applications/audio/bespokesynth {
inherit (darwin.apple_sdk_11_0.frameworks) Accelerate Cocoa WebKit CoreServices CoreAudioKit IOBluetooth MetalKit;
};

bespokesynth-with-vst2 = bespokesynth.override {
Expand Down