Commit ceca5e26 authored by Vincent Hanquez's avatar Vincent Hanquez

add ISC license to cabal init

parent 43224685
......@@ -67,7 +67,7 @@ import Language.Haskell.Extension ( Language(..) )
import Distribution.Client.Init.Types
( InitFlags(..), PackageType(..), Category(..) )
import Distribution.Client.Init.Licenses
( bsd2, bsd3, gplv2, gplv3, lgpl21, lgpl3, agplv3, apache20, mit, mpl20 )
( bsd2, bsd3, gplv2, gplv3, lgpl21, lgpl3, agplv3, apache20, mit, mpl20, isc )
import Distribution.Client.Init.Heuristics
( guessPackageName, guessAuthorNameMail, guessMainFileCandidates,
SourceFileEntry(..),
......@@ -600,6 +600,9 @@ writeLicense flags = do
Flag (MPL (Version {versionBranch = [2, 0]}))
-> Just mpl20
Flag ISC
-> Just $ isc authors year
_ -> Nothing
case licenseFile of
......
......@@ -10,7 +10,7 @@ module Distribution.Client.Init.Licenses
, apache20
, mit
, mpl20
, isc
) where
type License = String
......@@ -3046,3 +3046,20 @@ mpl20 = unlines
, " This Source Code Form is \"Incompatible With Secondary Licenses\", as"
, " defined by the Mozilla Public License, v. 2.0."
]
isc :: String -> String -> License
isc authors year = unlines
[ "Copyright (c) " ++ year ++ " " ++ authors
, ""
, "Permission to use, copy, modify, and/or distribute this software for any purpose"
, "with or without fee is hereby granted, provided that the above copyright notice"
, "and this permission notice appear in all copies."
, ""
, "THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH"
, "REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND"
, "FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,"
, "INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS"
, "OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER"
, "TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF"
, "THIS SOFTWARE."
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment