23 stdenv.mkDerivation rec {
25 version = "unstable-2022-07-09";
27 src = fetchFromGitHub {
30 rev = "2c036316bcd512818aa9cc8129767ad9e0ec7132";
31 fetchSubmodules = true;
32 sha256 = "sha256-6buvA72YRlGjHWLPEZMr45lYYG6ZY+IWmylcHruX27g=";
36 # needs special setup on Linux, dunno if it can work on Darwin
37 # https://github.com/NixOS/nixpkgs/issues/19098
38 sed -i -e '/juce::juce_recommended_lto_flags/d' Source/CMakeLists.txt
46 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
55 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
65 # JUCE insists on only dlopen'ing these
66 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux (toString [
76 vst3Dir = if stdenv.hostPlatform.isDarwin then "$out/Library/Audio/Plug-Ins/VST3" else "$out/lib/vst3";
77 # this one's a guess, don't know where ppl have agreed to put them yet
78 clapDir = if stdenv.hostPlatform.isDarwin then "$out/Library/Audio/Plug-Ins/CLAP" else "$out/lib/clap";
79 auDir = "$out/Library/Audio/Plug-Ins/Components";
83 '' + (if stdenv.hostPlatform.isDarwin then ''
84 mkdir -p $out/{Applications,bin}
85 mv Source/Dexed_artefacts/Release/Standalone/Dexed.app $out/Applications/
86 ln -s $out/{Applications/Dexed.app/Contents/MacOS,bin}/Dexed
88 install -Dm755 {Source/Dexed_artefacts/Release/Standalone,$out/bin}/Dexed
90 mkdir -p ${vst3Dir} ${clapDir}
91 mv Source/Dexed_artefacts/Release/VST3/* ${vst3Dir}
92 mv Source/Dexed_artefacts/Release/CLAP/* ${clapDir}
93 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
95 mv Source/Dexed_artefacts/Release/AU/* ${auDir}
102 description = "DX7 FM multi platform/multi format plugin";
103 mainProgram = "Dexed";
104 homepage = "https://asb2m10.github.io/dexed";
105 license = licenses.gpl3Only;
106 platforms = platforms.all;
107 maintainers = with maintainers; [ OPNA2608 ];