How to display GMail labels in Mutt?

gmail, gmail-imap, mutt

Solution

Todd Hoffmann created a patch that is able to display labels coming from GMail as if they were X-Label. An up-to-date version can be found here.

Problem

I'm having a hard time trying to display GMail labels inside Mutt. I'm able to display the labels folders very easily, but I would like to display the labels for each mail, using index format. It seems that GMail exposes labels using the extension X-GM-LABELS, but it seems that Mut is not able to get them. I found a proxy that should do the job: https://github.com/zmughal/gmail-imap-label but I wasn't able to compile it on my system because of missing dependencies. Is there a good solution to this problem ?

Original source