aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/licentia/license/extension.lux
blob: 1ce3bfcccbd3e477b08060780106cc33c044f54c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
(.module:
  [lux #*
   [data
    ["." text
     format]
    [collection
     [list ("list/." monoid)]]]]
  ["." // (#+ Extension)
   ["_" term]
   ["." grant]
   [time (#+ Months Period)]
   [//
    ["$" document]]])

(def: #export sharing-requirement
  (List Text)
  (let [on-extension (let [constraint (let [because "In consideration of, and as an express condition to, "
                                            source (format "the licenses granted to " _.recipient
                                                           " under " _.license)]
                                        (format because " " source))
                           duty (format _.recipient
                                        " hereby agrees that any " _.extension
                                        " that " _.recipient
                                        " creates or to which " _.recipient
                                        " contributes are governed by the terms of " _.license)]
                       (format constraint ", " duty))
        on-deployment (format _.recipient " may only " _.deploy
                              " an " _.extension
                              " that " _.recipient
                              " creates under the terms of " _.license)
        on-sharing (format _.recipient
                           " hereby grant to " _.licensor
                           " and all third parties a " ($.and grant.grant-characteristics)
                           " license under those intellectual property rights " _.recipient
                           " owns or controls to " ($.or grant.copyright-grant-rights)
                           " " _.work
                           " in any form")
        on-license-propagation (format _.recipient
                                       " must include a copy of " _.license
                                       " or directions on how to obtain a copy with every copy of an " _.extension
                                       " " _.recipient " distributes")
        on-license-protection (format _.recipient
                                      " agrees not to offer or impose any terms on any " _.source-code-form
                                      " or " _.object-form
                                      " of the " _.work
                                      ", or its " _.extension
                                      " that alter or restrict the applicable version of " _.license
                                      " or the recipients' rights hereunder")]
    (list on-extension
          on-deployment
          on-sharing
          on-license-propagation
          on-license-protection)))

(def: #export license-conflict-resolution
  (List Text)
  (let [on-other-licenses (let [circumstance (format "Where any portion of an " _.extension
                                                     " created by " _.recipient)
                                consequence "fall under the terms of another license"
                                duty "the terms of that license should be honored"]
                            (format circumstance " " consequence ", " duty))
        on-this-license (format "However " _.recipient
                                " must also make the " _.extension
                                " available under " _.license)
        on-licensor-judgement (let [condition (format "the terms of " _.license " continue to conflict with the terms of the other license")
                                    right (format _.recipient " may write " _.licensor " for permission to resolve the conflict")
                                    characteristic (format "a fashion that remains consistent with the intent of " _.license)]
                                (format "If " condition ", " right " in " characteristic))
        on-licensor-discretion (format "Such permission will be granted at the sole discretion of " _.licensor)]
    (list on-other-licenses
          on-this-license
          on-licensor-judgement
          on-licensor-discretion)))

(def: #export distinctness-requirement
  ($.paragraph (list (format "Any " _.extension
                             " " _.recipient
                             " does make and " _.deploy
                             " must have a distinct title so as to readily tell any subsequent user or " _.contributor
                             " that the " _.extension
                             " is by " _.recipient))))

(def: news-sources
  (List Text)
  (list "news groups"
        "mailing lists"
        "weblogs"
        "other sites"))

(def: #export (notification-requirement [start end])
  (-> (Period Months) Text)
  (let [on-availability (format _.recipient
                                " must notify the software community of the availability of the " _.source-code-form
                                " to any " _.extension
                                " created by " _.recipient
                                " within " (%n start)
                                " month(s) of the date " _.recipient
                                " initially does " _.deploy
                                ", and include in such notification a description of the " _.extension
                                ", and instructions on how to acquire the " _.source-code-form
                                " via an " _.electronic-distribution-mechanism)
        on-duration (format "The " _.source-code-form
                            " must remain available via an " _.electronic-distribution-mechanism
                            " for no less than " (%n end)
                            " month(s) after the date " _.recipient
                            " ceases to " _.deploy)
        on-responsibility (format _.recipient
                                  " is responsible for ensuring that the " _.source-code-form
                                  " to each " _.extension
                                  " " _.recipient
                                  " does " _.deploy
                                  " remains available even if the " _.electronic-distribution-mechanism
                                  " is maintained by a third party")
        on-costs (format _.recipient
                         " may not charge a fee for any copy of the " _.source-code-form
                         " in excess of the actual cost of duplication and distribution of said copy that " _.recipient
                         " incurs")
        on-changes (format "Should such instructions change, " _.recipient
                           " must notify the software community of revised instructions within " (%n start)
                           " month(s) of the date of change")
        on-accesibility (format _.recipient
                                " must provide notification by posting to appropriate " ($.or news-sources)
                                " where a publicly accessible search engine would reasonably be expected to index a post in relationship to queries regarding " _.work
                                " and/or an " _.extension
                                " created by " _.recipient)]
    ($.paragraph (list on-availability
                       on-duration
                       on-responsibility
                       on-costs
                       on-changes
                       on-accesibility))))

(def: #export description-requirement
  Text
  (let [on-duty (let [basic (format _.recipient
                                    " must cause any " _.modification
                                    " that " _.recipient
                                    " creates, or to which " _.recipient
                                    " contributes, to be documented in the " _.source-code-form)
                      modification-types (: (List Text)
                                            (list "additions"
                                                  "changes"
                                                  "deletions"))
                      details (format "clearly describing the " ($.and modification-types)
                                      " that " _.recipient " made")]
                  (format basic ", " details))
        on-notice-location (let [statement-locations (: (List Text)
                                                        (list (format "in the " _.source-code-form)
                                                              (format "in any notice displayed by " _.work
                                                                      " " _.recipient
                                                                      " distributes")
                                                              (format "in related documentation in which " _.recipient
                                                                      " describes the origin or ownership of " _.work)))]
                             (format _.recipient
                                     " must include a prominent statement that the " _.modification
                                     " is derived, directly or indirectly, from " _.work
                                     " and include the names of " _.licensor
                                     " and any " _.contributor
                                     " to " _.work
                                     " " ($.and statement-locations)))
        on-notice-preservation (format _.recipient
                                       " may not modify or delete any pre-existing copyright notices, change notices or the text of " _.license
                                       " in " _.work
                                       " without written permission of " _.licensor
                                       " or the respective " _.contributor)]
    ($.paragraph (list on-duty
                       on-notice-location
                       on-notice-preservation))))