From a02dea35304327afa2e082e2c8774670ba747d1e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 16 Oct 2025 09:35:24 +0200 Subject: [PATCH 1/4] fromSPDXLicense: make use of `lib.licensesSpdx` --- .../Nixpkgs/Haskell/FromCabal/License.hs | 102 +----------------- .../test/golden-test-cases/pandoc.nix.golden | 2 +- 2 files changed, 2 insertions(+), 102 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index 74a69f897..0ac508588 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs @@ -53,107 +53,7 @@ fromSPDXLicense (SPDX.License expr) = 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) + SPDX.ELicenseId lid -> Known ("lib.licensesSpdx.\"" ++ prettyShow lid ++ "\"") _ -> -- Not handed: the '+' suffix and user-defined licences references. -- Use the SPDX expression as a free-form license string. diff --git a/cabal2nix/test/golden-test-cases/pandoc.nix.golden b/cabal2nix/test/golden-test-cases/pandoc.nix.golden index c9227225a..9401f4216 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"; } From 3acaa74ede8c8c7587cc80e3744db8a01964d63d Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 16 Oct 2025 20:01:05 +0200 Subject: [PATCH 2/4] fromSPDXLicense: handel compound licenses --- .../Nixpkgs/Haskell/FromCabal/License.hs | 36 +++++++++++-------- .../test/golden-test-cases/pandoc.nix.golden | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index 0ac508588..bea811920 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 @@ -46,22 +47,27 @@ fromCabalLicense (UnknownLicense "BSD3ClauseORApache20") = Known "lib.licenses 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 -> Known ("lib.licensesSpdx.\"" ++ prettyShow lid ++ "\"") - _ -> - -- 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.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/pandoc.nix.golden b/cabal2nix/test/golden-test-cases/pandoc.nix.golden index 9401f4216..cfa2b8389 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.licensesSpdx."GPL-2.0-or-later"; + license = [ lib.licensesSpdx."GPL-2.0-or-later" ]; mainProgram = "pandoc"; } From 3994038c4f73a23fdcb91e408cbec76ef8c64afb Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sun, 19 Oct 2025 01:55:17 +0200 Subject: [PATCH 3/4] fromSPDXLicense: mark SPDX.NONE as generic free Hackage requires open source licenses so this should always be a free license --- cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index bea811920..cfbc08b11 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs @@ -66,7 +66,7 @@ fromSPDXLicenseExpression (SPDX.EAnd expres1 expres2) = Known (prettyShow (fromS 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.NONE = Known "lib.licenses.free" fromSPDXLicense (SPDX.License expr) = Known ("[ " ++ prettyShow (fromSPDXLicenseExpression expr) ++ " ]") -- "isFreeLicense" is used to determine whether we generate a "hydraPlatforms = From 1a2e97ecc96e6d40f4d2c7f3e946354f424cb205 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sun, 19 Oct 2025 01:56:27 +0200 Subject: [PATCH 4/4] fromCabalLicense: don't return stringy licenses --- .../src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs | 8 ++++---- cabal2nix/test/golden-test-cases/HTF.nix.golden | 2 +- cabal2nix/test/golden-test-cases/bioalign.nix.golden | 2 +- cabal2nix/test/golden-test-cases/ede.nix.golden | 2 +- .../golden-test-cases/gogol-adexchange-buyer.nix.golden | 2 +- .../gogol-admin-emailmigration.nix.golden | 2 +- .../test/golden-test-cases/gogol-affiliates.nix.golden | 2 +- .../test/golden-test-cases/gogol-apps-tasks.nix.golden | 2 +- .../test/golden-test-cases/gogol-appstate.nix.golden | 2 +- cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden | 2 +- .../test/golden-test-cases/gogol-datastore.nix.golden | 2 +- .../test/golden-test-cases/gogol-dfareporting.nix.golden | 2 +- .../golden-test-cases/gogol-firebase-rules.nix.golden | 2 +- cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden | 2 +- .../test/golden-test-cases/gogol-kgsearch.nix.golden | 2 +- .../test/golden-test-cases/gogol-maps-engine.nix.golden | 2 +- cabal2nix/test/golden-test-cases/gogol-plus.nix.golden | 2 +- .../test/golden-test-cases/gogol-resourceviews.nix.golden | 2 +- .../test/golden-test-cases/gogol-translate.nix.golden | 2 +- .../golden-test-cases/gogol-webmaster-tools.nix.golden | 2 +- cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden | 2 +- .../test/golden-test-cases/highlighting-kate.nix.golden | 2 +- cabal2nix/test/golden-test-cases/hxt-expat.nix.golden | 2 +- cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden | 2 +- .../test/golden-test-cases/incremental-parser.nix.golden | 2 +- .../golden-test-cases/lambdabot-social-plugins.nix.golden | 2 +- .../test/golden-test-cases/openpgp-asciiarmor.nix.golden | 2 +- .../golden-test-cases/polynomials-bernstein.nix.golden | 2 +- cabal2nix/test/golden-test-cases/readline.nix.golden | 2 +- cabal2nix/test/golden-test-cases/swagger.nix.golden | 2 +- cabal2nix/test/golden-test-cases/texmath.nix.golden | 2 +- .../test/golden-test-cases/vivid-supercollider.nix.golden | 2 +- 32 files changed, 35 insertions(+), 35 deletions(-) diff --git a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs index cfbc08b11..0f7ea773d 100644 --- a/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs +++ b/cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs @@ -18,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" @@ -41,7 +41,7 @@ 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" diff --git a/cabal2nix/test/golden-test-cases/HTF.nix.golden b/cabal2nix/test/golden-test-cases/HTF.nix.golden index 77303a63c..33fb35cd1 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 acf004d03..f057c8a6b 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 c381869c7..c980b9891 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 2d961fb1e..f5253c258 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 58f2744e2..60284e3c5 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 a2274813e..316aac6b5 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 9d89b972b..b03fd2fec 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 d54cc2e42..3f759c1d0 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 4b3bb2540..7a665cf60 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 56bb1fafa..9d2727597 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 3a59372a7..6af47e8b4 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 bb4397d80..a4863a4b2 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 7eb3ffa49..0cd5af405 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 577c6b745..517d6838c 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 7c75068ea..d8c496d49 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 459a5e92e..761c021ce 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 52778287a..d3af22f02 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 c11ea6fb7..ea2f03e2a 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 4782da286..2051d095a 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 4aa1e070d..cf809386c 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 8a39665ac..ad97c0a6f 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 acf2207cd..9609dae55 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 87c6e89ed..80bd5b5fd 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 4a442ec31..05245a6ac 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 09ec76842..f0ffce268 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 a081bfdb3..8e9375aee 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/polynomials-bernstein.nix.golden b/cabal2nix/test/golden-test-cases/polynomials-bernstein.nix.golden index f4c5c4649..1d0df7b69 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 35d1fb005..014437543 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 287a622c0..4d66adecb 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 a25e97736..431d31519 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 4a42a8697..d93f4e599 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; }