1 { lib, stdenv, fetchFromGitHub, fetchpatch, cmake, pkg-config
2 , libjack2, alsa-lib, freetype, libX11, libXrandr, libXinerama, libXext, libXcursor
7 # Derived from subprojects/function2.wrap
10 src = fetchFromGitHub {
14 hash = "sha256-JceZU8ZvtYhFheh8BjMvjjZty4hcYxHEK+IIo5X4eSk=";
19 version = "unstable-2021-04-07";
20 src = fetchFromGitHub {
21 owner = "juce-framework";
23 rev = "1a5fb5992a1a4e28e998708ed8dce2cc864a30d7";
24 sha256= "1ri7w4sz3sy5xilibg53ls9526fx7jwbv8rc54ccrqfhxqyin308";
29 in stdenv.mkDerivation rec {
31 version = "unstable-2021-5-13";
33 src = fetchFromGitHub {
34 owner = "robbert-vdh";
36 fetchSubmodules = true;
37 rev = "d5fdc92f1caf5a828e071dac99e106e58f06d84d";
38 sha256 = "06y1h895yxh44gp4vxzrna59lf7nlfw7aacd3kk4l1g56jhy9pdx";
43 name = "fix-gcc-11-build.patch";
44 url = "https://github.com/robbert-vdh/diopser/commit/a7284439bd4e23455132e7806a214f9db12efae9.patch";
45 hash = "sha256-r3yxhnhPUQ47srhfAKeurpe2xyEBdSvqIbgqs9/6gD4=";
52 cp -R --no-preserve=mode,ownership ${function2.src} function2
53 cp -R --no-preserve=mode,ownership ${juce.src} JUCE
54 sed -i 's@CPMAddPackage("gh:juce-framework/JUCE.*@add_subdirectory(JUCE)@g' CMakeLists.txt
55 sed -i 's@CPMAddPackage("gh:Naios/function2.*@add_subdirectory(function2)@g' CMakeLists.txt
61 mkdir -p $out/lib/vst3
62 cp -r Diopser_artefacts/Release/VST3/Diopser.vst3 $out/lib/vst3
65 nativeBuildInputs = [ cmake pkg-config ];
68 libjack2 alsa-lib freetype libX11 libXrandr libXinerama libXext
73 "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
74 "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
78 description = "Totally original phase rotation plugin";
79 homepage = "https://github.com/robbert-vdh/diopser";
80 license = licenses.gpl3Plus;
81 maintainers = with maintainers; [ magnetophon ];
82 platforms = platforms.all;