Skip to content

Updated accepted licenses #1092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Distribution/Server/Packages/Unpack.hs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import Distribution.Text
-- import qualified Distribution.Compat.CharParsing as P
import Distribution.Server.Util.ParseSpecVer
import qualified Distribution.SPDX as SPDX
import qualified Distribution.SPDX.LicenseId as SPDX.LId
import qualified Distribution.License as License

import Control.Monad.Except
Expand Down Expand Up @@ -492,7 +493,7 @@ isAcceptableLicense = either goSpdx goLegacy . licenseRaw
goSimple (SPDX.ELicenseRef _) = False -- don't allow referenced licenses
goSimple (SPDX.ELicenseIdPlus _) = False -- don't allow + licenses (use GPL-3.0-or-later e.g.)
goSimple (SPDX.ELicenseId SPDX.CC0_1_0) = True -- CC0 isn't OSI approved, but we allow it as "PublicDomain", this is eg. PublicDomain in http://hackage.haskell.org/package/string-qq-0.0.2/src/LICENSE
goSimple (SPDX.ELicenseId lid) = SPDX.licenseIsOsiApproved lid -- allow only OSI approved licenses.
goSimple (SPDX.ELicenseId lid) = SPDX.licenseIsOsiApproved lid || SPDX.LId.licenseIsFsfLibre lid -- allow only OSI or FSF approved licenses.

-- pre `cabal-version: 2.2`
goLegacy License.AllRightsReserved = False
Expand Down