That depends on exactly what you mean by that. The funding sources are quite diverse. Most often, they start out with no funding at all and then, once they solve problems of interest to enough people, they start to attract both government and private sponsors.
But yes, there are government grants. Here's the first example I could find, one for developing a secure Linux desktop: