2022-04-15 01:41:22 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, alsa-lib
|
|
|
|
, freetype
|
|
|
|
, libjack2
|
|
|
|
, lv2
|
|
|
|
, libX11
|
|
|
|
, libXcursor
|
|
|
|
, libXext
|
|
|
|
, libXinerama
|
|
|
|
, libXrandr
|
|
|
|
, libGL
|
|
|
|
, gcc-unwrapped
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "odin2";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.3.4";
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-11-21 17:40:18 +00:00
|
|
|
owner = "TheWaveWarden";
|
2022-04-15 01:41:22 +00:00
|
|
|
repo = "odin2";
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "v${version}";
|
2022-04-15 01:41:22 +00:00
|
|
|
fetchSubmodules = true;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-N96Nb7G6hqfh8DyMtHbttl/fRZUkS8f2KfPSqeMAhHY=";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed '1i#include <utility>' -i \
|
|
|
|
libs/JUCELV2/modules/juce_gui_basics/windows/juce_ComponentPeer.h # gcc12
|
|
|
|
'';
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsa-lib
|
|
|
|
freetype
|
|
|
|
libjack2
|
|
|
|
lv2
|
|
|
|
libX11
|
|
|
|
libXcursor
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
libGL
|
|
|
|
];
|
|
|
|
|
|
|
|
# JUCE dlopen's these at runtime, crashes without them
|
|
|
|
NIX_LDFLAGS = (toString [
|
|
|
|
"-lX11"
|
|
|
|
"-lXext"
|
|
|
|
"-lXcursor"
|
|
|
|
"-lXinerama"
|
|
|
|
"-lXrandr"
|
|
|
|
]);
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DCMAKE_AR=${gcc-unwrapped}/bin/gcc-ar"
|
|
|
|
"-DCMAKE_RANLIB=${gcc-unwrapped}/bin/gcc-ranlib"
|
|
|
|
"-DCMAKE_NM=${gcc-unwrapped}/bin/gcc-nm"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-11-21 17:40:18 +00:00
|
|
|
mkdir -p $out/bin $out/lib/vst3 $out/lib/lv2 $out/lib/clap
|
2022-04-15 01:41:22 +00:00
|
|
|
cd Odin2_artefacts/Release
|
2022-11-21 17:40:18 +00:00
|
|
|
cp Standalone/Odin2 $out/bin
|
2022-04-15 01:41:22 +00:00
|
|
|
cp -r VST3/Odin2.vst3 $out/lib/vst3
|
2022-11-21 17:40:18 +00:00
|
|
|
cp -r LV2/Odin2.lv2 $out/lib/lv2
|
|
|
|
cp -r CLAP/Odin2.clap $out/lib/clap
|
2022-04-15 01:41:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Odin 2 Synthesizer Plugin";
|
|
|
|
homepage = "https://thewavewarden.com/odin2";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ magnetophon ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "Odin2";
|
2022-04-15 01:41:22 +00:00
|
|
|
};
|
|
|
|
}
|