diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index 74a69f89..0f7ea773 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs @@ -9,7 +9,8 @@ module Distribution.Nixpkgs.Haskell.FromCabal.License import Data.List (intercalate) import Distribution.License ( License(..), knownLicenses ) import Distribution.Nixpkgs.License -import Distribution.Pretty (prettyShow) +import qualified Distribution.Pretty as DPretty +import Language.Nix.PrettyPrinting (prettyShow) import qualified Distribution.SPDX as SPDX import Distribution.Text (display) import Distribution.Version @@ -17,16 +18,16 @@ import Distribution.Version -- TODO: Programmatically strip trailing zeros from license version numbers. fromCabalLicense :: Distribution.License.License -> Distribution.Nixpkgs.License.License -fromCabalLicense (GPL Nothing) = Unknown (Just "GPL") +fromCabalLicense (GPL Nothing) = Known "lib.licenses.gpl2Plus" fromCabalLicense (GPL (Just (versionNumbers -> [2]))) = Known "lib.licenses.gpl2Only" fromCabalLicense (GPL (Just (versionNumbers -> [3]))) = Known "lib.licenses.gpl3Only" fromCabalLicense (GPL (Just (versionNumbers -> [3,0]))) = Known "lib.licenses.gpl3Only" -fromCabalLicense (LGPL Nothing) = Unknown (Just "LGPL") +fromCabalLicense (LGPL Nothing) = Known "lib.licenses.lgpl2Plus" fromCabalLicense (LGPL (Just (versionNumbers -> [2,1]))) = Known "lib.licenses.lgpl21Only" fromCabalLicense (LGPL (Just (versionNumbers -> [2]))) = Known "lib.licenses.lgpl2Only" fromCabalLicense (LGPL (Just (versionNumbers -> [3]))) = Known "lib.licenses.lgpl3Only" fromCabalLicense (LGPL (Just (versionNumbers -> [3,0]))) = Known "lib.licenses.lgpl3Only" -fromCabalLicense (AGPL Nothing) = Unknown (Just "AGPL") +fromCabalLicense (AGPL Nothing) = Known "lib.licenses.agpl3Plus" fromCabalLicense (AGPL (Just (versionNumbers -> [3]))) = Known "lib.licenses.agpl3Only" fromCabalLicense (AGPL (Just (versionNumbers -> [3,0]))) = Known "lib.licenses.agpl3Only" fromCabalLicense (MPL (versionNumbers -> [2,0])) = Known "lib.licenses.mpl20" @@ -40,128 +41,33 @@ fromCabalLicense AllRightsReserved = Known "lib.licenses fromCabalLicense (Apache Nothing) = Known "lib.licenses.asl20" fromCabalLicense (Apache (Just (versionNumbers -> [2,0]))) = Known "lib.licenses.asl20" fromCabalLicense ISC = Known "lib.licenses.isc" -fromCabalLicense OtherLicense = Unknown Nothing +fromCabalLicense OtherLicense = Known "lib.licenses.free" fromCabalLicense (UnknownLicense "CC0-1.0") = Known "lib.licenses.cc0" fromCabalLicense (UnknownLicense "BSD3ClauseORApache20") = Known "lib.licenses.bsd3" fromCabalLicense l = error $ "Distribution.Nixpkgs.Haskell.FromCabal.License.fromCabalLicense: unknown license" ++ show l ++"\nChoose one of: " ++ intercalate ", " (map display knownLicenses) +fromSPDXLicenseExpression :: SPDX.LicenseExpression -> Distribution.Nixpkgs.License.License +fromSPDXLicenseExpression (SPDX.ELicense simpl Nothing) = + case simpl of + SPDX.ELicenseId lid -> Known ("lib.licensesSpdx.\"" ++ DPretty.prettyShow lid ++ "\"") + _ -> + -- Not handed: the '+' suffix and user-defined licences references. + -- Use the SPDX expression as a free-form license string. + Unknown (Just $ DPretty.prettyShow simpl) +fromSPDXLicenseExpression (SPDX.ELicense simpl (Just excep)) = + case simpl of + SPDX.ELicenseId lid -> Known ("lib.licensesSpdx.\"" ++ DPretty.prettyShow lid ++ "\" lib.licensesSpdx.\"" ++ DPretty.prettyShow excep ++ "\"") + _ -> + -- Not handed: the '+' suffix and user-defined licences references. + -- Use the SPDX expression as a free-form license string. + Known ("\"" ++ DPretty.prettyShow simpl ++ "\" lib.licensesSpdx.\"" ++ DPretty.prettyShow excep ++ "\"") +fromSPDXLicenseExpression (SPDX.EAnd expres1 expres2) = Known (prettyShow (fromSPDXLicenseExpression expres1) ++ " " ++ prettyShow (fromSPDXLicenseExpression expres2)) +fromSPDXLicenseExpression (SPDX.EOr expres1 expres2) = Known (prettyShow (fromSPDXLicenseExpression expres1) ++ " " ++ prettyShow (fromSPDXLicenseExpression expres2)) + fromSPDXLicense :: SPDX.License -> Distribution.Nixpkgs.License.License -fromSPDXLicense SPDX.NONE = Unknown Nothing -fromSPDXLicense (SPDX.License expr) = - case expr of - SPDX.ELicense simpl Nothing -> - -- Not handled: license exceptions - case simpl of - SPDX.ELicenseId lid -> - case lid of - SPDX.AFL_2_1 -> Known "lib.licenses.afl21" - SPDX.AFL_3_0 -> Known "lib.licenses.afl3" - SPDX.AGPL_3_0_only -> Known "lib.licenses.agpl3Only" - SPDX.AGPL_3_0_or_later -> Known "lib.licenses.agpl3Plus" - SPDX.APSL_2_0 -> Known "lib.licenses.apsl20" - SPDX.Artistic_1_0 -> Known "lib.licenses.artistic1" - SPDX.Artistic_2_0 -> Known "lib.licenses.artistic2" - SPDX.Apache_2_0 -> Known "lib.licenses.asl20" - SPDX.BSL_1_0 -> Known "lib.licenses.boost" - SPDX.Beerware -> Known "lib.licenses.beerware" - SPDX.NullBSD -> Known "lib.licenses.bsd0" - SPDX.BSD_2_Clause -> Known "lib.licenses.bsd2" - SPDX.BSD_3_Clause -> Known "lib.licenses.bsd3" - SPDX.BSD_4_Clause -> Known "lib.licenses.bsdOriginal" - SPDX.ClArtistic -> Known "lib.licenses.clArtistic" - SPDX.CC0_1_0 -> Known "lib.licenses.cc0" - SPDX.CC_BY_NC_SA_2_0 -> Known "lib.licenses.cc-by-nc-sa-20" - SPDX.CC_BY_NC_SA_2_5 -> Known "lib.licenses.cc-by-nc-sa-25" - SPDX.CC_BY_NC_SA_3_0 -> Known "lib.licenses.cc-by-nc-sa-30" - SPDX.CC_BY_NC_SA_4_0 -> Known "lib.licenses.cc-by-nc-sa-40" - SPDX.CC_BY_NC_4_0 -> Known "lib.licenses.cc-by-nc-40" - SPDX.CC_BY_ND_3_0 -> Known "lib.licenses.cc-by-nd-30" - SPDX.CC_BY_SA_2_5 -> Known "lib.licenses.cc-by-sa-25" - SPDX.CC_BY_3_0 -> Known "lib.licenses.cc-by-30" - SPDX.CC_BY_SA_3_0 -> Known "lib.licenses.cc-by-sa-30" - SPDX.CC_BY_4_0 -> Known "lib.licenses.cc-by-40" - SPDX.CC_BY_SA_4_0 -> Known "lib.licenses.cc-by-sa-40" - SPDX.CDDL_1_0 -> Known "lib.licenses.cddl" - SPDX.CECILL_2_0 -> Known "lib.licenses.cecill20" - SPDX.CECILL_B -> Known "lib.licenses.cecill-b" - SPDX.CECILL_C -> Known "lib.licenses.cecill-c" - SPDX.CPAL_1_0 -> Known "lib.licenses.cpal10" - SPDX.CPL_1_0 -> Known "lib.licenses.cpl10" - SPDX.Curl -> Known "lib.licenses.curl" - SPDX.DOC -> Known "lib.licenses.doc" - SPDX.EFL_1_0 -> Known "lib.licenses.efl10" - SPDX.EFL_2_0 -> Known "lib.licenses.efl20" - SPDX.EPL_1_0 -> Known "lib.licenses.epl10" - SPDX.EPL_2_0 -> Known "lib.licenses.epl20" - SPDX.EUPL_1_1 -> Known "lib.licenses.eupl11" - SPDX.GFDL_1_2_only -> Known "lib.licenses.fdl12Only" - SPDX.GFDL_1_3_only -> Known "lib.licenses.fdl13Only" - SPDX.GPL_1_0_only -> Known "lib.licenses.gpl1Only" - SPDX.GPL_1_0_or_later -> Known "lib.licenses.gpl1Plus" - SPDX.GPL_2_0_only -> Known "lib.licenses.gpl2Only" - SPDX.GPL_2_0_or_later -> Known "lib.licenses.gpl2Plus" - SPDX.GPL_3_0_only -> Known "lib.licenses.gpl3Only" - SPDX.GPL_3_0_or_later -> Known "lib.licenses.gpl3Plus" - SPDX.HPND -> Known "lib.licenses.hpnd" - SPDX.IJG -> Known "lib.licenses.ijg" - SPDX.ImageMagick -> Known "lib.licenses.imagemagick" - SPDX.IPA -> Known "lib.licenses.ipa" - SPDX.IPL_1_0 -> Known "lib.licenses.ipl10" - SPDX.ISC -> Known "lib.licenses.isc" - SPDX.LGPL_2_0_only -> Known "lib.licenses.lgpl2Only" - SPDX.LGPL_2_0_or_later -> Known "lib.licenses.lgpl2Plus" - SPDX.LGPL_2_1_only -> Known "lib.licenses.lgpl21Only" - SPDX.LGPL_2_1_or_later -> Known "lib.licenses.lgpl21Plus" - SPDX.LGPL_3_0_only -> Known "lib.licenses.lgpl3Only" - SPDX.LGPL_3_0_or_later -> Known "lib.licenses.lgpl3Plus" - SPDX.Libpng -> Known "lib.licenses.libpng" - SPDX.Libtiff -> Known "lib.licenses.libtiff" - SPDX.LPPL_1_2 -> Known "lib.licenses.lppl12" - SPDX.LPPL_1_3c -> Known "lib.licenses.lppl13c" - SPDX.LPL_1_02 -> Known "lib.licenses.lpl-102" - SPDX.MIT -> Known "lib.licenses.mit" - SPDX.MPL_1_0 -> Known "lib.licenses.mpl10" - SPDX.MPL_1_1 -> Known "lib.licenses.mpl11" - SPDX.MPL_2_0 -> Known "lib.licenses.mpl20" - SPDX.MS_PL -> Known "lib.licenses.mspl" - SPDX.NCSA -> Known "lib.licenses.ncsa" - SPDX.NPOSL_3_0 -> Known "lib.licenses.nposl3" - SPDX.OFL_1_1 -> Known "lib.licenses.ofl" - SPDX.OLDAP_2_8 -> Known "lib.licenses.openldap" - SPDX.OpenSSL -> Known "lib.licenses.openssl" - SPDX.OSL_2_1 -> Known "lib.licenses.osl21" - SPDX.OSL_3_0 -> Known "lib.licenses.osl3" - SPDX.PHP_3_01 -> Known "lib.licenses.php201" - SPDX.PostgreSQL -> Known "lib.licenses.postgresql" - SPDX.Python_2_0 -> Known "lib.licenses.psfl" - SPDX.QPL_1_0 -> Known "lib.licenses.qpl" - SPDX.Ruby -> Known "lib.licenses.ruby" - SPDX.Sendmail -> Known "lib.licenses.sendmail" - SPDX.SGI_B_2_0 -> Known "lib.licenses.sgi-b-0" - SPDX.Sleepycat -> Known "lib.licenses.sleepycat" - SPDX.TCL -> Known "lib.licenses.tcltx" - SPDX.Unlicense -> Known "lib.licenses.unlicense" - SPDX.Vim -> Known "lib.licenses.vim" - SPDX.VSL_1_0 -> Known "lib.licenses.vsl10" - SPDX.Watcom_1_0 -> Known "lib.licenses.watcom" - SPDX.W3C -> Known "lib.licenses.w3c" - SPDX.WTFPL -> Known "lib.licenses.wtfpl" - SPDX.Zlib -> Known "lib.licenses.zlib" - SPDX.ZPL_2_0 -> Known "lib.licenses.zpl20" - SPDX.ZPL_2_1 -> Known "lib.licenses.zpl21" - _ -> - -- Licence is not in Nixpkgs. - -- Use the SPDX expression as a free-form license string. - Unknown (Just $ prettyShow expr) - _ -> - -- Not handed: the '+' suffix and user-defined licences references. - -- Use the SPDX expression as a free-form license string. - Unknown (Just $ prettyShow expr) - _ -> - -- Not handled: compound expressions, not expressible in Nixpkgs. - -- Use the SPDX expression as a free-form license string. - Unknown (Just $ prettyShow expr) +fromSPDXLicense SPDX.NONE = Known "lib.licenses.free" +fromSPDXLicense (SPDX.License expr) = Known ("[ " ++ prettyShow (fromSPDXLicenseExpression expr) ++ " ]") -- "isFreeLicense" is used to determine whether we generate a "hydraPlatforms = -- none" in the hackage2nix output for a package with the given license. diff --git a/cabal2nix/test/golden-test-cases/HTF.nix.golden b/cabal2nix/test/golden-test-cases/HTF.nix.golden index 77303a63..33fb35cd 100644 --- a/cabal2nix/test/golden-test-cases/HTF.nix.golden +++ b/cabal2nix/test/golden-test-cases/HTF.nix.golden @@ -27,6 +27,6 @@ mkDerivation { ]; homepage = "https://github.com/skogsbaer/HTF/"; description = "The Haskell Test Framework"; - license = "LGPL"; + license = lib.licenses.lgpl2Plus; mainProgram = "htfpp"; } diff --git a/cabal2nix/test/golden-test-cases/bioalign.nix.golden b/cabal2nix/test/golden-test-cases/bioalign.nix.golden index acf004d0..f057c8a6 100644 --- a/cabal2nix/test/golden-test-cases/bioalign.nix.golden +++ b/cabal2nix/test/golden-test-cases/bioalign.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base biocore bytestring ]; homepage = "https://patch-tag.com/r/dfornika/biophd/home"; description = "Data structures and helper functions for calculating alignments"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/ede.nix.golden b/cabal2nix/test/golden-test-cases/ede.nix.golden index c381869c..c980b989 100644 --- a/cabal2nix/test/golden-test-cases/ede.nix.golden +++ b/cabal2nix/test/golden-test-cases/ede.nix.golden @@ -20,5 +20,5 @@ mkDerivation { ]; homepage = "http://github.com/brendanhay/ede"; description = "Templating language with similar syntax and features to Liquid or Jinja2"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-adexchange-buyer.nix.golden b/cabal2nix/test/golden-test-cases/gogol-adexchange-buyer.nix.golden index 2d961fb1..f5253c25 100644 --- a/cabal2nix/test/golden-test-cases/gogol-adexchange-buyer.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-adexchange-buyer.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Ad Exchange Buyer SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-admin-emailmigration.nix.golden b/cabal2nix/test/golden-test-cases/gogol-admin-emailmigration.nix.golden index 58f2744e..60284e3c 100644 --- a/cabal2nix/test/golden-test-cases/gogol-admin-emailmigration.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-admin-emailmigration.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Email Migration API v2 SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-affiliates.nix.golden b/cabal2nix/test/golden-test-cases/gogol-affiliates.nix.golden index a2274813..316aac6b 100644 --- a/cabal2nix/test/golden-test-cases/gogol-affiliates.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-affiliates.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Affiliate Network SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-apps-tasks.nix.golden b/cabal2nix/test/golden-test-cases/gogol-apps-tasks.nix.golden index 9d89b972..b03fd2fe 100644 --- a/cabal2nix/test/golden-test-cases/gogol-apps-tasks.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-apps-tasks.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Tasks SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-appstate.nix.golden b/cabal2nix/test/golden-test-cases/gogol-appstate.nix.golden index d54cc2e4..3f759c1d 100644 --- a/cabal2nix/test/golden-test-cases/gogol-appstate.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-appstate.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google App State SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden b/cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden index 4b3bb254..7a665cf6 100644 --- a/cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Blogger SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-datastore.nix.golden b/cabal2nix/test/golden-test-cases/gogol-datastore.nix.golden index 56bb1faf..9d272759 100644 --- a/cabal2nix/test/golden-test-cases/gogol-datastore.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-datastore.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Cloud Datastore SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-dfareporting.nix.golden b/cabal2nix/test/golden-test-cases/gogol-dfareporting.nix.golden index 3a59372a..6af47e8b 100644 --- a/cabal2nix/test/golden-test-cases/gogol-dfareporting.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-dfareporting.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google DCM/DFA Reporting And Trafficking SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-firebase-rules.nix.golden b/cabal2nix/test/golden-test-cases/gogol-firebase-rules.nix.golden index bb4397d8..a4863a4b 100644 --- a/cabal2nix/test/golden-test-cases/gogol-firebase-rules.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-firebase-rules.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Firebase Rules SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden b/cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden index 7eb3ffa4..0cd5af40 100644 --- a/cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Gmail SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-kgsearch.nix.golden b/cabal2nix/test/golden-test-cases/gogol-kgsearch.nix.golden index 577c6b74..517d6838 100644 --- a/cabal2nix/test/golden-test-cases/gogol-kgsearch.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-kgsearch.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Knowledge Graph Search SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-maps-engine.nix.golden b/cabal2nix/test/golden-test-cases/gogol-maps-engine.nix.golden index 7c75068e..d8c496d4 100644 --- a/cabal2nix/test/golden-test-cases/gogol-maps-engine.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-maps-engine.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Maps Engine SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-plus.nix.golden b/cabal2nix/test/golden-test-cases/gogol-plus.nix.golden index 459a5e92..761c021c 100644 --- a/cabal2nix/test/golden-test-cases/gogol-plus.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-plus.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google + SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-resourceviews.nix.golden b/cabal2nix/test/golden-test-cases/gogol-resourceviews.nix.golden index 52778287..d3af22f0 100644 --- a/cabal2nix/test/golden-test-cases/gogol-resourceviews.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-resourceviews.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Compute Engine Instance Groups SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-translate.nix.golden b/cabal2nix/test/golden-test-cases/gogol-translate.nix.golden index c11ea6fb..ea2f03e2 100644 --- a/cabal2nix/test/golden-test-cases/gogol-translate.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-translate.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Translate SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-webmaster-tools.nix.golden b/cabal2nix/test/golden-test-cases/gogol-webmaster-tools.nix.golden index 4782da28..2051d095 100644 --- a/cabal2nix/test/golden-test-cases/gogol-webmaster-tools.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-webmaster-tools.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google Search Console SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden b/cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden index 4aa1e070..cf809386 100644 --- a/cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden +++ b/cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base gogol-core ]; homepage = "https://github.com/brendanhay/gogol"; description = "Google YouTube Data SDK"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/highlighting-kate.nix.golden b/cabal2nix/test/golden-test-cases/highlighting-kate.nix.golden index 8a39665a..ad97c0a6 100644 --- a/cabal2nix/test/golden-test-cases/highlighting-kate.nix.golden +++ b/cabal2nix/test/golden-test-cases/highlighting-kate.nix.golden @@ -18,5 +18,5 @@ mkDerivation { ]; homepage = "http://github.com/jgm/highlighting-kate"; description = "Syntax highlighting"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/hxt-expat.nix.golden b/cabal2nix/test/golden-test-cases/hxt-expat.nix.golden index acf2207c..9609dae5 100644 --- a/cabal2nix/test/golden-test-cases/hxt-expat.nix.golden +++ b/cabal2nix/test/golden-test-cases/hxt-expat.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base bytestring hexpat hxt ]; homepage = "http://www.fh-wedel.de/~si/HXmlToolbox/index.html"; description = "Expat parser for HXT"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden b/cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden index 87c6e89e..80bd5b5f 100644 --- a/cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden +++ b/cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden @@ -10,5 +10,5 @@ mkDerivation { ]; homepage = "https://github.com/UweSchmidt/hxt"; description = "TagSoup parser for HXT"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/incremental-parser.nix.golden b/cabal2nix/test/golden-test-cases/incremental-parser.nix.golden index 4a442ec3..05245a6a 100644 --- a/cabal2nix/test/golden-test-cases/incremental-parser.nix.golden +++ b/cabal2nix/test/golden-test-cases/incremental-parser.nix.golden @@ -14,5 +14,5 @@ mkDerivation { ]; homepage = "https://github.com/blamario/incremental-parser"; description = "Generic parser library capable of providing partial results from partial input"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/lambdabot-social-plugins.nix.golden b/cabal2nix/test/golden-test-cases/lambdabot-social-plugins.nix.golden index 09ec7684..f0ffce26 100644 --- a/cabal2nix/test/golden-test-cases/lambdabot-social-plugins.nix.golden +++ b/cabal2nix/test/golden-test-cases/lambdabot-social-plugins.nix.golden @@ -10,5 +10,5 @@ mkDerivation { ]; homepage = "https://wiki.haskell.org/Lambdabot"; description = "Social plugins for Lambdabot"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/openpgp-asciiarmor.nix.golden b/cabal2nix/test/golden-test-cases/openpgp-asciiarmor.nix.golden index a081bfdb..8e9375ae 100644 --- a/cabal2nix/test/golden-test-cases/openpgp-asciiarmor.nix.golden +++ b/cabal2nix/test/golden-test-cases/openpgp-asciiarmor.nix.golden @@ -14,5 +14,5 @@ mkDerivation { ]; homepage = "http://floss.scru.org/openpgp-asciiarmor"; description = "OpenPGP (RFC4880) ASCII Armor codec"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/pandoc.nix.golden b/cabal2nix/test/golden-test-cases/pandoc.nix.golden index c9227225..cfa2b838 100644 --- a/cabal2nix/test/golden-test-cases/pandoc.nix.golden +++ b/cabal2nix/test/golden-test-cases/pandoc.nix.golden @@ -49,6 +49,6 @@ mkDerivation { ]; homepage = "https://pandoc.org"; description = "Conversion between markup formats"; - license = lib.licenses.gpl2Plus; + license = [ lib.licensesSpdx."GPL-2.0-or-later" ]; mainProgram = "pandoc"; } diff --git a/cabal2nix/test/golden-test-cases/polynomials-bernstein.nix.golden b/cabal2nix/test/golden-test-cases/polynomials-bernstein.nix.golden index f4c5c464..1d0df7b6 100644 --- a/cabal2nix/test/golden-test-cases/polynomials-bernstein.nix.golden +++ b/cabal2nix/test/golden-test-cases/polynomials-bernstein.nix.golden @@ -5,5 +5,5 @@ mkDerivation { sha256 = "deadbeef"; libraryHaskellDepends = [ base vector ]; description = "A solver for systems of polynomial equations in bernstein form"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/readline.nix.golden b/cabal2nix/test/golden-test-cases/readline.nix.golden index 35d1fb00..01443754 100644 --- a/cabal2nix/test/golden-test-cases/readline.nix.golden +++ b/cabal2nix/test/golden-test-cases/readline.nix.golden @@ -6,5 +6,5 @@ mkDerivation { libraryHaskellDepends = [ base process ]; librarySystemDepends = [ ncurses readline ]; description = "An interface to the GNU readline library"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/swagger.nix.golden b/cabal2nix/test/golden-test-cases/swagger.nix.golden index 287a622c..4d66adec 100644 --- a/cabal2nix/test/golden-test-cases/swagger.nix.golden +++ b/cabal2nix/test/golden-test-cases/swagger.nix.golden @@ -10,5 +10,5 @@ mkDerivation { ]; testHaskellDepends = [ aeson base bytestring tasty tasty-hunit ]; description = "Implementation of swagger data model"; - license = "unknown"; + license = lib.licenses.free; } diff --git a/cabal2nix/test/golden-test-cases/texmath.nix.golden b/cabal2nix/test/golden-test-cases/texmath.nix.golden index a25e9773..431d3151 100644 --- a/cabal2nix/test/golden-test-cases/texmath.nix.golden +++ b/cabal2nix/test/golden-test-cases/texmath.nix.golden @@ -17,5 +17,5 @@ mkDerivation { ]; homepage = "http://github.com/jgm/texmath"; description = "Conversion between formats used to represent mathematics"; - license = "GPL"; + license = lib.licenses.gpl2Plus; } diff --git a/cabal2nix/test/golden-test-cases/vivid-supercollider.nix.golden b/cabal2nix/test/golden-test-cases/vivid-supercollider.nix.golden index 4a42a869..d93f4e59 100644 --- a/cabal2nix/test/golden-test-cases/vivid-supercollider.nix.golden +++ b/cabal2nix/test/golden-test-cases/vivid-supercollider.nix.golden @@ -13,5 +13,5 @@ mkDerivation { vivid-osc ]; description = "Implementation of SuperCollider server specifications"; - license = "GPL"; + license = lib.licenses.gpl2Plus; }