Merge pull request #172702 from OPNA2608/fix/adlplug_everything
{adl,opn}plug: 1.0.2 -> unstable-2021-12-17, fix Darwin, fix Linux de…
This commit is contained in:
commit
1b0f5bf701
@ -13,11 +13,22 @@
|
||||
, libXinerama
|
||||
, libXext
|
||||
, libXcursor
|
||||
, libobjc
|
||||
, Foundation
|
||||
, Cocoa
|
||||
, Carbon
|
||||
, CoreServices
|
||||
, ApplicationServices
|
||||
, CoreAudio
|
||||
, CoreMIDI
|
||||
, AudioToolbox
|
||||
, Accelerate
|
||||
, CoreImage
|
||||
, IOKit
|
||||
, AudioUnit
|
||||
, QuartzCore
|
||||
, WebKit
|
||||
, DiscRecording
|
||||
, CoreAudioKit
|
||||
|
||||
# Enabling JACK requires a JACK server at runtime, no fallback mechanism
|
||||
, withJack ? false, jack
|
||||
@ -35,25 +46,16 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${lib.strings.toLower type}plug";
|
||||
version = "1.0.2";
|
||||
version = "unstable-2021-12-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jpcima";
|
||||
repo = "ADLplug";
|
||||
rev = "v${version}";
|
||||
rev = "a488abedf1783c61cb4f0caa689f1b01bf9aa17d";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "0mqx4bzri8s880v7jwd24nb93m5i3aklqld0b3h0hjnz0lh2qz0f";
|
||||
sha256 = "1a5zw0rglqgc5wq1n0s5bxx7y59dsg6qy02236fakl34bvbk60yz";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/jpcima/ADLplug/83636c55bec1b86cabf634b9a6d56d07f00ecc61/resources/patch/juce-gcc9.patch";
|
||||
sha256 = "15hkdb76n9lgjsrpczj27ld9b4804bzrgw89g95cj4sc8wwkplyy";
|
||||
extraPrefix = "thirdparty/JUCE/";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DADLplug_CHIP=${chip}"
|
||||
"-DADLplug_USE_SYSTEM_FMT=ON"
|
||||
@ -61,9 +63,24 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
|
||||
# "fp.h" file not found
|
||||
"-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers"
|
||||
]);
|
||||
|
||||
NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Framework that JUCE needs which don't get linked properly
|
||||
"-framework CoreAudioKit"
|
||||
"-framework QuartzCore"
|
||||
"-framework AudioToolbox"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
# JUCE dlopen's these at runtime
|
||||
"-lX11"
|
||||
"-lXext"
|
||||
"-lXcursor"
|
||||
"-lXinerama"
|
||||
"-lXrandr"
|
||||
]);
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
@ -81,17 +98,32 @@ stdenv.mkDerivation rec {
|
||||
libXext
|
||||
libXcursor
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libobjc
|
||||
Foundation
|
||||
Cocoa
|
||||
Carbon
|
||||
CoreServices
|
||||
ApplicationServices
|
||||
CoreAudio
|
||||
CoreMIDI
|
||||
AudioToolbox
|
||||
Accelerate
|
||||
CoreImage
|
||||
IOKit
|
||||
AudioUnit
|
||||
QuartzCore
|
||||
WebKit
|
||||
DiscRecording
|
||||
CoreAudioKit
|
||||
] ++ lib.optional withJack jack;
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir $out/Applications
|
||||
mkdir -p $out/{Applications,Library/Audio/Plug-Ins/{VST,Components}}
|
||||
|
||||
mv $out/bin/${mainProgram}.app $out/Applications/
|
||||
ln -s $out/{Applications/${mainProgram}.app/Contents/MacOS,bin}/${mainProgram}
|
||||
|
||||
mv vst2/${mainProgram}.vst $out/Library/Audio/Plug-Ins/VST/
|
||||
mv au/${mainProgram}.component $out/Library/Audio/Plug-Ins/Components/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -986,8 +986,7 @@ with pkgs;
|
||||
addlicense = callPackage ../tools/misc/addlicense { };
|
||||
|
||||
adlplug = callPackage ../applications/audio/adlplug {
|
||||
inherit (darwin) libobjc;
|
||||
inherit (darwin.apple_sdk.frameworks) Cocoa CoreServices WebKit DiscRecording;
|
||||
inherit (darwin.apple_sdk.frameworks) Foundation Cocoa Carbon CoreServices ApplicationServices CoreAudio CoreMIDI AudioToolbox Accelerate CoreImage IOKit AudioUnit QuartzCore WebKit DiscRecording CoreAudioKit;
|
||||
jack = libjack2;
|
||||
};
|
||||
opnplug = adlplug.override {
|
||||
|
Loading…
Reference in New Issue
Block a user