anchor.diff:      pythonPackages.dbus
     ];
   
  -  prePatch = ''
  +  postPatch = ''
       sed -i svnversion_regenerate.sh \
         -e 's,/bin/bash,${bash}/bin/bash,'
  +
  +    # FIXME: disable tests to work around bug with gcc7
  +    ## if not bld.env['IS_WINDOWS']:
  +    ##   bld.recurse('tests')
  +    sed -i wscript \
  +      -e 's/not bld.env/bld.env/'
     '';
  -
  -  patches = [
  -    ./jack-gcc5.patch
  -  ];
   
     configurePhase = ''
       python waf configure --prefix=$out \
  
positive.code:       ${optionalString (!libOnly) "--alsa"} \
        --autostart=dbus \
    '';
  
    CXXFLAGS = "-std=c++98";
  
    buildPhase = ''
      python waf build
  
negative.code: 
    libOnly = prefix == "lib";
  
    version = "2017-05-18";
  in
  stdenv.mkDerivation rec {
    name = "${prefix}jack2-${version}";
  
    src = fetchFromGitHub {
      version = 3;
      owner = "jackaudio";
      repo = "jack2";
      rev = "31d4ae97f296fe1c954cbb51e50d5e60578260b8";
      sha256 = "c357e5e8384231dab58e8070c9fc7515e6975f1fa61c98e7231bd3dbb3964cf5";
    };
  
    nativeBuildInputs = [
  