MPL-2.0 applies copyleft at the file level: if you modify an MPL-2.0 file, that file stays under MPL-2.0, but new files can be under a different license. This makes it easier to combine MPL-2.0 code with proprietary code than GPL or LGPL.
It includes an explicit patent grant and retaliation clause. It is compatible with both GPL and Apache-style licenses, which makes MPL-2.0 a common choice for projects that want some copyleft protection without scaring off commercial users.
How to apply
Add a LICENSE file with the full MPL-2.0 text. Each source file should start with the MPL notice:
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
Full license text
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
(Terms such as "Contributor", "Covered Software", "Executable Form",
"Larger Work", "License", "Modifications", "Source Code Form", "You"
are defined here.)
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer for
sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License.
… this text is abbreviated.
For the complete license text, see https://www.mozilla.org/MPL/2.0/
Raw text also available at /license-texts/MPL-2.0.txt — handy for curl.