cps-org / cps

Common Package Specification — A cross-tool mechanism for locating software dependencies
https://cps-org.github.io/cps/
Other
99 stars 8 forks source link

Custom Licenses #24

Open autoantwort opened 10 months ago

autoantwort commented 10 months ago

Currently SPDX license identifiers are encouraged, with https://github.com/cps-org/cps/pull/22 required.
SPDX defines LicenseRef-.* to use custom licenses (See here and here). I think cps should also define something so that custom license ids could be defined and used in the license expression so that custom licenses could be represented. We could use the fields from https://spdx.github.io/spdx-spec/v2.2.2/other-licensing-information-detected/: Maybe something like this:

{
  "Name": "sample",
  "Description": "Sample CPS",
  "License": "LicenseRef-MyLicense",
  "license-definitions": {
    "LicenseRef-MyLicense": {
      "name": "MyLicense maybe with special characters",
      "see-also": "http://example.com/licenses/our-license",
      "comment": "This is a comment",
      "extracted-text": "Do whatever you want with this code"
    }    
  }
}