Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Cabal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
4feb3cf1
Commit
4feb3cf1
authored
Sep 07, 2018
by
Herbert Valerio Riedel
🕺
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update user guide re `license:` field & SPDX [ci skip]
cc
@phadej
parent
f54c5f48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
9 deletions
+74
-9
Cabal/doc/developing-packages.rst
Cabal/doc/developing-packages.rst
+72
-7
Cabal/doc/file-format-changelog.rst
Cabal/doc/file-format-changelog.rst
+2
-2
No files found.
Cabal/doc/developing-packages.rst
View file @
4feb3cf1
...
...
@@ -915,14 +915,79 @@ describe the package as a whole:
For most packages, the build type ``Simple`` is sufficient.
.. pkg-field:: license: identifier
.. pkg-field:: license: SPDX expression
:default: ``NONE``
The type of license under which this package is distributed.
Starting with ``cabal-version: 2.2`` the ``license`` field takes a
(case-sensitive) SPDX expression such as
.. code-block:: cabal
license: Apache-2.0 AND (MIT OR GPL-2.0-or-later)
See `SPDX IDs: How to use <https://spdx.org/ids-how>`__ for more
examples of SPDX expressions.
The version of the
`list of SPDX license identifiers <https://spdx.org/licenses/>`__
is a function of the :pkg-field:`cabal-version` value as defined
in the following table:
+--------------------------+--------------------+
| Cabal specification | SPDX license list |
| version | version |
| | |
+==========================+====================+
| ``cabal-version: 2.2`` | ``3.0 2017-12-28`` |
+--------------------------+--------------------+
| ``cabal-version: 2.4`` | ``3.2 2018-07-10`` |
+--------------------------+--------------------+
**Pre-SPDX Legacy Identifiers**
The license identifier in the table below are defined for
``cabal-version: 2.0`` and previous versions of the Cabal
specification.
+--------------------------+-----------------+
| :pkg-field:`license` | Note |
| identifier | |
| | |
+==========================+=================+
| ``GPL`` | |
| ``GPL-2`` | |
| ``GPL-3`` | |
+--------------------------+-----------------+
| ``LGPL`` | |
| ``LGPL-2.1`` | |
| ``LGPL-3`` | |
+--------------------------+-----------------+
| ``AGPL`` | since 1.18 |
| ``AGPL-3`` | |
+--------------------------+-----------------+
| ``BSD2`` | since 1.20 |
+--------------------------+-----------------+
| ``BSD3`` | |
+--------------------------+-----------------+
| ``MIT`` | |
+--------------------------+-----------------+
| ``ISC`` | since 1.22 |
+--------------------------+-----------------+
| ``MPL-2.0`` | since 1.20 |
+--------------------------+-----------------+
| ``Apache`` | |
| ``Apache-2.0`` | |
+--------------------------+-----------------+
| ``PublicDomain`` | |
+--------------------------+-----------------+
| ``AllRightsReserved`` | |
+--------------------------+-----------------+
| ``OtherLicense`` | |
+--------------------------+-----------------+
:default: ``AllRightsReserved``
The type of license under which this package is distributed. License
names are the constants of the
`License <../release/cabal-latest/doc/API/Cabal/Distribution-License.html#t:License>`__
type.
.. pkg-field:: license-file: filename
...
...
Cabal/doc/file-format-changelog.rst
View file @
4feb3cf1
.. _spec-history:
==================================================
Package
description format specification h
istory
Package
Description Format Specification H
istory
==================================================
:ref:`pkg-desc` need to specify the version of the
...
...
@@ -67,7 +67,7 @@ relative to the respective preceding *published* version.
"build-type:" for "Simple"/"Custom" automatically.
* :pkg-field:`license` field syntax changed to require SPDX
expression syntax.
expression syntax
(using SPDX license list version ``3.0 2017-12-28``)
.
* Allow redundant leading or trailing commas in package fields (which
require commas) such as :pkg-field:`build-depends`.
...
...
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