anchor.diff:      sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6";
     };
   
  -  buildInputs = [ alsaLib audiofile libjack2 liblo liboil libsamplerate libsndfile lilv lv2 ];
  +  nativeBuildInputs = [
  +    pkg-config
  +  ];
  +
  +  buildInputs = [
  +    alsaLib
  +    audiofile
  +    libjack2
  +    liblo
  +    liboil
  +    libsamplerate
  +    libsndfile
  +    lilv
  +    lv2
  +    ncurses
  +    readline
  +  ];
  +
  +  strictDeps = true;
  +
  +  configureFlags = "--enable-liblilv --with-extra-cppflags=-Dnullptr=0";
  +
  +  postPatch = ''
  +    sed -i -e '
  +      s@^#include <readline.h>@#include <readline/readline.h>@
  +      s@^#include <history.h>@#include <readline/history.h>@
  +      ' ecasound/eca-curses.cpp
  +  '';
   
     meta = {
       description = "Software package designed for multitrack audio processing";
  
positive.code: , libsndfile
  , lilv
  , lv2
  }:
  
  # TODO: fix readline, ncurses, lilv, liblo, liboil and python. See configure log.
  
  stdenv.mkDerivation rec {
    pname = "ecasound";
  
negative.code: { stdenv
  , fetchurl
  , pkg-config
  , alsaLib
  , audiofile
  , libjack2
  