Skip to content

Commit e907996

Browse files
authored
Updated accepted licenses (#1092)
1 parent e72ee4f commit e907996

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Distribution/Server/Packages/Unpack.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import Distribution.Text
4242
-- import qualified Distribution.Compat.CharParsing as P
4343
import Distribution.Server.Util.ParseSpecVer
4444
import qualified Distribution.SPDX as SPDX
45+
import qualified Distribution.SPDX.LicenseId as SPDX.LId
4546
import qualified Distribution.License as License
4647

4748
import Control.Monad.Except
@@ -492,7 +493,7 @@ isAcceptableLicense = either goSpdx goLegacy . licenseRaw
492493
goSimple (SPDX.ELicenseRef _) = False -- don't allow referenced licenses
493494
goSimple (SPDX.ELicenseIdPlus _) = False -- don't allow + licenses (use GPL-3.0-or-later e.g.)
494495
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
495-
goSimple (SPDX.ELicenseId lid) = SPDX.licenseIsOsiApproved lid -- allow only OSI approved licenses.
496+
goSimple (SPDX.ELicenseId lid) = SPDX.licenseIsOsiApproved lid || SPDX.LId.licenseIsFsfLibre lid -- allow only OSI or FSF approved licenses.
496497

497498
-- pre `cabal-version: 2.2`
498499
goLegacy License.AllRightsReserved = False

0 commit comments

Comments
 (0)