If possible, keep the code from each project separated, but that is not always possible, especially if you are integrating multiple scripts.
Combining Code from Multiple Projects
At the very least, you have to leave the copyright notice and permissions notice intact for MIT licensed works, but it is a good practice to create an organized list of software that is used with their corresponding licenses.
There are a couple of practices that seem to work well:
- Creating a Software Bill of Materials (SBOM).
- Putting a copy of all of the licenses in a
licenses
subdirectory.
Or do both.
A Software Bill of Materials (SBOM) is a file that lists all of the works used in a project, their licenses, and the version used. It usually links back to each project's home page or repository.
This does a couple of things.
- First, it helps you stay in compliance with the MIT license because there is less of a possibility of the MIT license being accidentally deleted.
- Secondly, it gives you and future developers a reference list of where various pieces of code came from.
- Thirdly, it lets you know what versions of each software were used, so if there are security vulnerabilities in particular versions, you can see if you need to upgrade them.
If Each Individual File Has a Copyright Notice
In cases where each file has its own copyright notice and reference to the MIT license, you have to keep that intact, even if you modify it (unless you totally rewrite it, but that is not what we are talking about here).
If you modify the file or add code to a file, and the original file has its own copyright and reference to the MIT license, you can add text stating that the original file was based on the MIT licensed code; and that changes that were made are copyright by you (or your organization) and subject to a different license.
This contains code from {MIT licensed project name}
.
{keep their copyright notice and permission notice intact.}
It has been modified by {your name or your project or your organization}
{Your copyright notice and reference to your license.}
Something like this would make it clear that the new code falls under a new license, while still retaining the previous copyright notice and permission notice as required by the MIT license.
You only have to include something like this if the license is in each and every file, and not a separate license.txt file (or something similar).
Note: you only add your copyright notice and license to the file, if and only if you actually modified the file. Otherwise, you are falsely claiming the copyright of someone else's work. Only add your copyright notice and license to files you actually modify.
Summary
At the very least, you have to include the original copyright notices and permission notice (i.e. their MIT License). But presenting that information in a more organized way would be helpful for future references and future developers and administrators.