Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
d36e10c9
Commit
d36e10c9
authored
Mar 30, 2014
by
Ian D. Bollinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the text of the MIT license to cabal init.
parent
ba8b8a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
cabal-install/Distribution/Client/Init.hs
cabal-install/Distribution/Client/Init.hs
+4
-1
cabal-install/Distribution/Client/Init/Licenses.hs
cabal-install/Distribution/Client/Init/Licenses.hs
+25
-0
No files found.
cabal-install/Distribution/Client/Init.hs
View file @
d36e10c9
...
...
@@ -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
,
lgpl2
,
lgpl3
,
agplv3
,
apache20
,
mpl20
)
(
bsd2
,
bsd3
,
gplv2
,
gplv3
,
lgpl2
,
lgpl3
,
agplv3
,
apache20
,
mit
,
mpl20
)
import
Distribution.Client.Init.Heuristics
(
guessPackageName
,
guessAuthorNameMail
,
SourceFileEntry
(
..
),
scanForModules
,
neededBuildPrograms
)
...
...
@@ -562,6 +562,9 @@ writeLicense flags = do
Flag
(
Apache
(
Just
(
Version
{
versionBranch
=
[
2
,
0
]})))
->
Just
apache20
Flag
MIT
->
Just
$
mit
authors
year
Flag
(
MPL
(
Version
{
versionBranch
=
[
2
,
0
]}))
->
Just
mpl20
...
...
cabal-install/Distribution/Client/Init/Licenses.hs
View file @
d36e10c9
...
...
@@ -8,6 +8,7 @@ module Distribution.Client.Init.Licenses
,
lgpl3
,
agplv3
,
apache20
,
mit
,
mpl20
)
where
...
...
@@ -2624,6 +2625,30 @@ apache20 = unlines
,
" limitations under the License."
]
mit
::
String
->
String
->
License
mit
authors
year
=
unlines
[
"Copyright (c) "
++
year
++
" "
++
authors
,
""
,
"Permission is hereby granted, free of charge, to any person obtaining"
,
"a copy of this software and associated documentation files (the"
,
"
\"
Software
\"
), to deal in the Software without restriction, including"
,
"without limitation the rights to use, copy, modify, merge, publish,"
,
"distribute, sublicense, and/or sell copies of the Software, and to"
,
"permit persons to whom the Software is furnished to do so, subject to"
,
"the following conditions:"
,
""
,
"The above copyright notice and this permission notice shall be included"
,
"in all copies or substantial portions of the Software."
,
""
,
"THE SOFTWARE IS PROVIDED
\"
AS IS
\"
, WITHOUT WARRANTY OF ANY KIND,"
,
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF"
,
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT."
,
"IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY"
,
"CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,"
,
"TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE"
,
"SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
mpl20
::
License
mpl20
=
unlines
[
"Mozilla Public License Version 2.0"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment