anchor.diff:        homepage = https://lsp-plug.in;
         maintainers = with maintainers; [ magnetophon ];
         license = licenses.gpl2;
  -      platforms = [ "x86_64-linux" ];
  +      platforms = platforms.linux;
       };
   }
  
positive.code: { stdenv, fetchFromGitHub, pkgconfig, makeWrapper
  , libsndfile, jack2Full
  , libGLU, libGL, lv2, cairo
  , ladspaH, php, expat }:
  
  stdenv.mkDerivation rec {
    pname = "lsp-plugins";
    version = "1.1.10";
  
    src = fetchFromGitHub {
      owner = "sadko4u";
      repo = pname;
      rev = "${pname}-${version}";
      sha256 = "09gmwzh1gq1q2lxn8fc1bpdh02h8vr7r0i040c1nx256wgfsarqb";
    };
  
    nativeBuildInputs = [ pkgconfig php expat ];
    buildInputs = [ jack2Full libsndfile libGLU libGL lv2 cairo ladspaH makeWrapper ];
  
    makeFlags = [
      "BIN_PATH=$(out)/bin"
      "LIB_PATH=$(out)/lib"
      "DOC_PATH=$(out)/share/doc"
    ];
  
    NIX_CFLAGS_COMPILE = [ "-DLSP_NO_EXPERIMENTAL" ];
  
    patchPhase = ''
      runHook prePatch
      substituteInPlace Makefile --replace "/usr/lib" "$out/lib"
      substituteInPlace ./include/container/jack/main.h --replace "/usr/lib" "$out/lib"
      substituteInPlace ./include/container/vst/main.h --replace "/usr/lib" "$out/lib"
      # for https://github.com/sadko4u/lsp-plugins/issues/7#issuecomment-426561549 :
      sed -i '/X11__NET_WM_WINDOW_TYPE_DOCK;/d' ./src/ui/ws/x11/X11Window.cpp
      runHook postPatch
    '';
  
    doCheck = true;
  
  
negative.code:     runHook postCheck
    '';
  
    buildFlags = [ "release" ];
  
    meta = with stdenv.lib;
      { description = "Collection of open-source audio plugins";
  