aboutsummaryrefslogtreecommitdiff
path: root/licentia/source/program/licentia/license/extension.lux
blob: 208e039a550f24df9de4968ff3d28cf3025f9925 (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
(.require
 [library
  [lux (.except)
   [data
    ["[0]" text
     ["%" \\format (.only format)]]]]]
 ["[0]" // (.only Extension)
  [time (.only Months Period)]
  ["_" term]
  ["[0]" grant]
  [//
   ["$" document]]])

(def .public 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)
                           " " _.licensed_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 " _.licensed_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 .public 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 .public 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 .public (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 " (%.nat 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 " (%.nat 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 " (%.nat 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 " _.licensed_work
                                " and/or an " _.extension
                                " created by " _.recipient)]
    ($.paragraph (list on_availability
                       on_duration
                       on_responsibility
                       on_costs
                       on_changes
                       on_accesibility))))

(def .public 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 (is (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 (is (List Text)
                                                         (list (format "in the " _.source_code_form)
                                                               (format "in any notice displayed by " _.licensed_work
                                                                       " " _.recipient
                                                                       " distributes")
                                                               (format "in related documentation in which " _.recipient
                                                                       " describes the origin or ownership of " _.licensed_work)))]
                             (format _.recipient
                                     " must include a prominent statement that the " _.modification
                                     " is derived, directly or indirectly, from " _.licensed_work
                                     " and include the names of " _.licensor
                                     " and any " _.contributor
                                     " to " _.licensed_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 " _.licensed_work
                                       " without written permission of " _.licensor
                                       " or the respective " _.contributor)]
    ($.paragraph (list on_duty
                       on_notice_location
                       on_notice_preservation))))