anchor.diff:    doInstallCheck = true;
     installCheckPhase = ''
       ./build-linux.sh build -p headless
  -    ./target/headless/Release/Surge/Surge-Headless
  +    ./buildlin/surge-headless
     '';
   
     meta = with stdenv.lib; {
  
positive.code: { stdenv, fetchFromGitHub, premake5, pkgconfig, cmake
  ,cairo, libxkbcommon, libxcb, xcb-util-cursor, xcbutilkeysyms, ncurses, which, getopt
  ,python, gnome3, lato }:
  
  stdenv.mkDerivation rec {
    pname = "surge";
    version = "1.6.6";
  
    src = fetchFromGitHub {
      owner = "surge-synthesizer";
      repo = pname;
      rev = "release_${version}";
      sha256 = "0al021f516ybhnp3lhqx8i6c6hpfaw3gqfwwxx3lx3hh4b8kjfjw";
      fetchSubmodules = true;
    };
  
    nativeBuildInputs = [ premake5 pkgconfig cmake ncurses which getopt python ];
  
    buildInputs = [  cairo libxkbcommon libxcb xcb-util-cursor xcbutilkeysyms gnome3.zenity lato ];
  
    buildFlags = [ "config=release_x64" ];
  
  
negative.code:     substituteInPlace src/common/gui/PopupEditorDialog.cpp --replace zenity ${gnome3.zenity}/bin/zenity
    '';
  
    buildPhase = ''
      ./build-linux.sh build;
    '';
  
    installPhase = ''
      mkdir -p $out/lib/lv2
      cp -r buildlin/surge_products/Surge.lv2/ $out/lib/lv2
      mkdir -p $out/lib/vst3
      cp -r buildlin/surge_products/Surge.vst3/ $out/lib/vst3
      mkdir -p $out/share/surge
      cp -r resources/data/* $out/share/surge/
    '';
  