anchor.diff:      libsndfile
       lilv
       lv2
  +    pangomm
       serd
       sord
       sratom
  -    webkitgtk_2_4_gtk2
       zita-convolver
       zita-resampler
     ];
  +
  +  /* remove for 0.35.0 release */
  +  postUnpack = ''
  +    sourceRoot=$sourceRoot/trunk
  +  '';
  +
  +  postPatch = ''
  +    patchShebangs waf
  +  '';
   
     configureFlags = [
       "--nocache"
  
positive.code: , libsndfile
  , lilv
  , lv2
  , qjackctl
  , serd
  , sord
  , sratom
  , webkitgtk_2_4_gtk2
  , zita-convolver
  , zita-resampler
  , optimizationSupport ? false # Enable support for native CPU extensions
  }:
  
  let
    inherit (stdenv.lib) optional;
  in
  
  stdenv.mkDerivation rec {
    name = "guitarix-${version}";
    version = "0.34.0";
  
    src = fetchurl {
      url = "mirror://sourceforge/guitarix/guitarix2-${version}.tar.bz2";
      sha256 = "0pamaq8iybsaglq6y1m1rlmz4wgbs2r6m24bj7x4fwg4grjvzjl8";
    };
  
    NIX_CFLAGS_COMPILE = [
      #"-std=c++11"
      "-I${eigen}/include/eigen3"
    ];
  
    nativeBuildInputs = [
      gettext
      intltool
      pkgconfig
      python
    ];
  
    buildInputs = [
      avahi
      #bluez
      boost
      eigen
      fftw
      glib
  
negative.code:     "--no-ldconfig"
      "--no-desktop-update"
      "--enable-nls"
      "--no-faust"
    ] ++ optional optimizationSupport "--optimization";
  
    NIX_CFLAGS_COMPILE = [
      #"-std=c++11"
      "-I${eigen}/include/eigen3"
    ];
  
    configurePhase = ''
        ./waf configure --prefix=$out $configureFlags
      '';
  
    buildPhase = ''
      ./waf build
    '';
  
    installPhase = ''
      ./waf install
    '';
  
    preFixup = ''
      wrapProgram $out/bin/guitarix \
        --prefix 'PATH' : "${qjackctl}/bin"
    '';
  
    meta = with stdenv.lib; {
      description = "A virtual guitar amplifier";
      homepage = http://guitarix.sourceforge.net/;
      license = licenses.gpl3Plus;
      maintainers = with maintainers; [
        codyopel
      ];
      platforms = with platforms;
        x86_64-linux;
    };
  }
  