diff options
author | Eduardo Julian | 2020-12-09 20:42:37 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-12-09 20:42:37 -0400 |
commit | 893c76ad530ca0e81cd84602543c3114407f4592 (patch) | |
tree | 6d14f38c7b9f5b37809615d0dca7545b36405525 /stdlib/source/program/licentia/license | |
parent | 8df63aae42c40ac0413ccfacc3b2e8eb72e00a15 (diff) |
Added support for "Commons Clause" to Licentia.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/program/licentia/license.lux | 6 | ||||
-rw-r--r-- | stdlib/source/program/licentia/license/addendum.lux | 28 |
2 files changed, 33 insertions, 1 deletions
diff --git a/stdlib/source/program/licentia/license.lux b/stdlib/source/program/licentia/license.lux index 375ed8c12..c62c8419d 100644 --- a/stdlib/source/program/licentia/license.lux +++ b/stdlib/source/program/licentia/license.lux @@ -46,6 +46,9 @@ #url URL #image (Maybe URL)}) +(type: #export Addendum + {#commons-clause? Bit}) + (type: #export License {#copyright-holders (List /copyright.Holder) #identification (Maybe Identification) @@ -55,4 +58,5 @@ #commercial Commercial #extension Extension #black-lists (List Black-List) - #attribution (Maybe Attribution)}) + #attribution (Maybe Attribution) + #addendum Addendum}) diff --git a/stdlib/source/program/licentia/license/addendum.lux b/stdlib/source/program/licentia/license/addendum.lux new file mode 100644 index 000000000..7e467c630 --- /dev/null +++ b/stdlib/source/program/licentia/license/addendum.lux @@ -0,0 +1,28 @@ +(.module: + [lux #* + [data + [text + ["%" format (#+ format)]]]] + ["." // (#+ Addendum) + [// + ["$" document]]]) + +## https://commonsclause.com/ +(def: #export commons-clause + Text + (format ($.block "The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.") + ($.block "Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.") + ($.block "For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice."))) + +(def: #export (output value) + (-> Addendum Text) + (`` (format (~~ (template [<title> <condition> <content>] + [(if <condition> + ($.block ($.section {#$.title <title> + #$.content <content>})) + "")] + + ["“Commons Clause” License Condition v1.0" + (get@ #//.commons-clause? value) + ..commons-clause] + ))))) |