@@ -5,19 +5,19 @@ import Distribution.License ( License(..) )
55import Data.Version
66
77fromCabalLicense :: Distribution.License.License -> Distribution.NixOS.Derivation.License.License
8−fromCabalLicense (GPL Nothing) = Unknown (Just "GPL")
9−fromCabalLicense (GPL (Just (Version [2] []))) = Known "self.stdenv.lib.licenses.gpl2"
10−fromCabalLicense (GPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
11−fromCabalLicense (LGPL Nothing) = Unknown (Just "LGPL")
12−fromCabalLicense (LGPL (Just (Version [2,1] []))) = Known "self.stdenv.lib.licenses.lgpl21"
13−fromCabalLicense (LGPL (Just (Version [2] []))) = Known "self.stdenv.lib.licenses.lgpl2"
14−fromCabalLicense (LGPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
15−fromCabalLicense BSD3 = Known "self.stdenv.lib.licenses.bsd3"
16−fromCabalLicense BSD4 = Known "self.stdenv.lib.licenses.bsd4"
17−fromCabalLicense MIT = Known "self.stdenv.lib.licenses.mit"
18−fromCabalLicense PublicDomain = Known "self.stdenv.lib.licenses.publicDomain"
19−fromCabalLicense AllRightsReserved = Known "self.stdenv.lib.licenses.unfree"
20−fromCabalLicense (Apache Nothing) = Known "self.stdenv.lib.licenses.asl20"
21−fromCabalLicense (Apache (Just (Version [2,0] [])))= Known "self.stdenv.lib.licenses.asl20"
22−fromCabalLicense OtherLicense = Unknown Nothing
23−fromCabalLicense l = error $ "Cabal2Nix.License.fromCabalLicense: unknown license " ++ show l
8+fromCabalLicense (GPL Nothing) = Unknown (Just "GPL")
9+fromCabalLicense (GPL (Just (Version [2] []))) = Known "self.stdenv.lib.licenses.gpl2"
10+fromCabalLicense (GPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
11+fromCabalLicense (LGPL Nothing) = Unknown (Just "LGPL")
12+fromCabalLicense (LGPL (Just (Version [2,1] []))) = Known "self.stdenv.lib.licenses.lgpl21"
13+fromCabalLicense (LGPL (Just (Version [2] []))) = Known "self.stdenv.lib.licenses.lgpl2"
14+fromCabalLicense (LGPL (Just (Version [3] []))) = Known "self.stdenv.lib.licenses.gpl3"
15+fromCabalLicense BSD3 = Known "self.stdenv.lib.licenses.bsd3"
16+fromCabalLicense BSD4 = Known "self.stdenv.lib.licenses.bsd4"
17+fromCabalLicense MIT = Known "self.stdenv.lib.licenses.mit"
18+fromCabalLicense PublicDomain = Known "self.stdenv.lib.licenses.publicDomain"
19+fromCabalLicense AllRightsReserved = Known "self.stdenv.lib.licenses.unfree"
20+fromCabalLicense (Apache Nothing) = Known "self.stdenv.lib.licenses.asl20"
21+fromCabalLicense (Apache (Just (Version [2,0] []))) = Known "self.stdenv.lib.licenses.asl20"
22+fromCabalLicense OtherLicense = Unknown Nothing
23+fromCabalLicense l = error $ "Cabal2Nix.License.fromCabalLicense: unknown license " ++ show l