I'm trying to compile an application by doing that:

find ../../vibe.d/source/vibe -type f | grep -v "/appmain.d" | grep -v "/d.d" > build/vibe.txt
find src -type f > build/src.txt
dmd -debug -odbuild -I../../d-yaml -L-L../../d-yaml -L-ldyaml -Isrc -I../../vibe.d/source/vibe @build/vibe.txt -L-levent_pthreads -L-levent -L-lssl -L-lcrypto @build/src.txt -ofbin/app
../../vibe.d/source/vibe/core/drivers/libevent2_tcp.d(17): Error: module buffer is in file 'deimos/event2/buffer.d' which cannot be read

If I do include the source/deimos folder, I get the following error:

undefined reference to `ev_default_loop_init'

Any suggestions?