((nil . ((pony-settings (make-pony-project ...

is the same as:

    ((nil . ((pony-settings . ((make-pony-project ...

So you're setting `pony-settings` to `((make-pony-project ...))`

And it sounds like that form is then evaluated like so:

    ((make-pony-project ...))

Hence:

    eval: Invalid function: (make-pony-project ...)

So in summary, you're missing a dot.  You probably wanted:

    ((nil . ((pony-settings . (make-pony-project ...

See also the "Notation" heading at https://www.emacswiki.org/emacs/DirectoryVariables#toc1