Skip to content
Open
Show file tree
Hide file tree
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
146 changes: 26 additions & 120 deletions cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/License.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,25 @@ 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

-- 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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These cases are intentional as there is not enough information to conclude what variant of the license in question is used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do realize they were intentional, but they can't stay in their current form. I'm currently working towards disallowing stringy licenses in nixpkgs, and those are pretty much the only ones left. Other options would be to make it even less informational with lib.licenses.free or to add a new custom license (not really a fan of this).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at a few packages in more detail and I think we can reasonably do two things:

  • interpret GPL as gpl2Plus as done here. That's because they could have used GPL-2 or GPL-3 if they wanted to be more specific.
  • just use free as fallback for this.

For me, both are fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

free as a fallback seems reasonable for GPL without further specification, that is a good idea. (But not in general as a fallback for unknown, see #677 (comment)).

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"
Expand All @@ -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 ++ "\"")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In spirit, License holds a Nix expression, so we should not output fragments of one here, but instead make sure it is individually a valid Nix expression. As such the [] should be added in this function and not fromSPDXLicense.

Or we don't return a License here to make clear what's going on. In general, it may be wise to move this into a where since it is not really something that should be called except from fromSPDXLicense.

_ ->
-- Not handed: the '+' suffix and user-defined licences references.
Comment on lines +55 to +62
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- 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.
-- Not handled: 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 handled: the '+' suffix and user-defined licences references.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a typo in the commit message.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this comment repeated?

-- 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.
Expand Down
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/HTF.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ mkDerivation {
];
homepage = "https://github.com/skogsbaer/HTF/";
description = "The Haskell Test Framework";
license = "LGPL";
license = lib.licenses.lgpl2Plus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream has now LGPL-2.1, which renders as LGPL-2.1-only on hackage.

mainProgram = "htfpp";
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/bioalign.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/ede.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-appstate.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-blogger.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-gmail.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-kgsearch.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-plus.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ mkDerivation {
libraryHaskellDepends = [ base gogol-core ];
homepage = "https://github.com/brendanhay/gogol";
description = "Google + SDK";
license = "unknown";
license = lib.licenses.free;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/gogol-youtube.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ mkDerivation {
];
homepage = "http://github.com/jgm/highlighting-kate";
description = "Syntax highlighting";
license = "GPL";
license = lib.licenses.gpl2Plus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream still uses GPL, and has gpl2Only, I think: https://github.com/jgm/highlighting-kate/blob/master/LICENSE

}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/hxt-expat.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/hxt-tagsoup.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ mkDerivation {
];
homepage = "https://github.com/UweSchmidt/hxt";
description = "TagSoup parser for HXT";
license = "unknown";
license = lib.licenses.free;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream has changed to GPL-3 by now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is probably fine to update these test expressions to newer versions of the cabal file, but some of them may test something specific that has since been removed.

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ mkDerivation {
];
homepage = "https://wiki.haskell.org/Lambdabot";
description = "Social plugins for Lambdabot";
license = "GPL";
license = lib.licenses.gpl2Plus;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lambdabot-social-plugins has GPL, but.. the license looks like BSD/MIT: https://github.com/lambdabot/lambdabot/blob/master/lambdabot-social-plugins/LICENSE

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ mkDerivation {
];
homepage = "http://floss.scru.org/openpgp-asciiarmor";
description = "OpenPGP (RFC4880) ASCII Armor codec";
license = "unknown";
license = lib.licenses.free;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/pandoc.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/readline.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/swagger.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ mkDerivation {
];
testHaskellDepends = [ aeson base bytestring tasty tasty-hunit ];
description = "Implementation of swagger data model";
license = "unknown";
license = lib.licenses.free;
}
2 changes: 1 addition & 1 deletion cabal2nix/test/golden-test-cases/texmath.nix.golden
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

texmath has updated to GPL-2, which renders as GPL-2.0-only on hackage.

}
Loading
Loading