##// END OF EJS Templates
oss-licenses: Add license override for pyramid-debugtoolbar.
Martin Bornhold -
r206:5ce38ab3 default
parent child Browse files
Show More
@@ -1,269 +1,275 b''
1 # Overrides for the generated python-packages.nix
1 # Overrides for the generated python-packages.nix
2 #
2 #
3 # This function is intended to be used as an extension to the generated file
3 # This function is intended to be used as an extension to the generated file
4 # python-packages.nix. The main objective is to add needed dependencies of C
4 # python-packages.nix. The main objective is to add needed dependencies of C
5 # libraries and tweak the build instructions where needed.
5 # libraries and tweak the build instructions where needed.
6
6
7 { pkgs, basePythonPackages }:
7 { pkgs, basePythonPackages }:
8
8
9 let
9 let
10 sed = "sed -i";
10 sed = "sed -i";
11 localLicenses = {
11 localLicenses = {
12 repoze = {
12 repoze = {
13 fullName = "Repoze License";
13 fullName = "Repoze License";
14 url = http://www.repoze.org/LICENSE.txt;
14 url = http://www.repoze.org/LICENSE.txt;
15 };
15 };
16 };
16 };
17 in
17 in
18
18
19 self: super: {
19 self: super: {
20
20
21 appenlight-client = super.appenlight-client.override (attrs: {
21 appenlight-client = super.appenlight-client.override (attrs: {
22 meta = {
22 meta = {
23 license = [ pkgs.lib.licenses.bsdOriginal ];
23 license = [ pkgs.lib.licenses.bsdOriginal ];
24 };
24 };
25 });
25 });
26
26
27 future = super.future.override (attrs: {
27 future = super.future.override (attrs: {
28 meta = {
28 meta = {
29 license = [ pkgs.lib.licenses.mit ];
29 license = [ pkgs.lib.licenses.mit ];
30 };
30 };
31 });
31 });
32
32
33 gnureadline = super.gnureadline.override (attrs: {
33 gnureadline = super.gnureadline.override (attrs: {
34 buildInputs = attrs.buildInputs ++ [
34 buildInputs = attrs.buildInputs ++ [
35 pkgs.ncurses
35 pkgs.ncurses
36 ];
36 ];
37 patchPhase = ''
37 patchPhase = ''
38 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
38 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
39 '';
39 '';
40 });
40 });
41
41
42 gunicorn = super.gunicorn.override (attrs: {
42 gunicorn = super.gunicorn.override (attrs: {
43 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
43 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
44 # johbo: futures is needed as long as we are on Python 2, otherwise
44 # johbo: futures is needed as long as we are on Python 2, otherwise
45 # gunicorn explodes if used with multiple threads per worker.
45 # gunicorn explodes if used with multiple threads per worker.
46 self.futures
46 self.futures
47 ];
47 ];
48 });
48 });
49
49
50 ipython = super.ipython.override (attrs: {
50 ipython = super.ipython.override (attrs: {
51 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
51 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
52 self.gnureadline
52 self.gnureadline
53 ];
53 ];
54 });
54 });
55
55
56 kombu = super.kombu.override (attrs: {
56 kombu = super.kombu.override (attrs: {
57 # The current version of kombu needs some patching to work with the
57 # The current version of kombu needs some patching to work with the
58 # other libs. Should be removed once we update celery and kombu.
58 # other libs. Should be removed once we update celery and kombu.
59 patches = [
59 patches = [
60 ./patch-kombu-py-2-7-11.diff
60 ./patch-kombu-py-2-7-11.diff
61 ./patch-kombu-msgpack.diff
61 ./patch-kombu-msgpack.diff
62 ];
62 ];
63 });
63 });
64
64
65 lxml = super.lxml.override (attrs: {
65 lxml = super.lxml.override (attrs: {
66 buildInputs = with self; [
66 buildInputs = with self; [
67 pkgs.libxml2
67 pkgs.libxml2
68 pkgs.libxslt
68 pkgs.libxslt
69 ];
69 ];
70 });
70 });
71
71
72 MySQL-python = super.MySQL-python.override (attrs: {
72 MySQL-python = super.MySQL-python.override (attrs: {
73 buildInputs = attrs.buildInputs ++ [
73 buildInputs = attrs.buildInputs ++ [
74 pkgs.openssl
74 pkgs.openssl
75 ];
75 ];
76 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
76 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
77 pkgs.mysql.lib
77 pkgs.mysql.lib
78 pkgs.zlib
78 pkgs.zlib
79 ];
79 ];
80 });
80 });
81
81
82 psutil = super.psutil.override (attrs: {
82 psutil = super.psutil.override (attrs: {
83 buildInputs = attrs.buildInputs ++
83 buildInputs = attrs.buildInputs ++
84 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
84 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
85 });
85 });
86
86
87 psycopg2 = super.psycopg2.override (attrs: {
87 psycopg2 = super.psycopg2.override (attrs: {
88 buildInputs = attrs.buildInputs ++
88 buildInputs = attrs.buildInputs ++
89 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
89 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
90 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
90 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
91 pkgs.postgresql
91 pkgs.postgresql
92 ];
92 ];
93 # TODO:
93 # TODO:
94 # - https://stackoverflow.com/questions/7751445/can-i-bundle-psycopg2-with-a-closed-source-django-application-using-py2exe
94 # - https://stackoverflow.com/questions/7751445/can-i-bundle-psycopg2-with-a-closed-source-django-application-using-py2exe
95 meta = {
95 meta = {
96 license = pkgs.lib.licenses.lgpl3Plus;
96 license = pkgs.lib.licenses.lgpl3Plus;
97 };
97 };
98 });
98 });
99
99
100 pycurl = super.pycurl.override (attrs: {
100 pycurl = super.pycurl.override (attrs: {
101 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
101 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
102 pkgs.curl
102 pkgs.curl
103 pkgs.openssl
103 pkgs.openssl
104 ];
104 ];
105 preConfigure = ''
105 preConfigure = ''
106 substituteInPlace setup.py --replace '--static-libs' '--libs'
106 substituteInPlace setup.py --replace '--static-libs' '--libs'
107 export PYCURL_SSL_LIBRARY=openssl
107 export PYCURL_SSL_LIBRARY=openssl
108 '';
108 '';
109 meta = {
109 meta = {
110 # TODO: It is LGPL and MIT
110 # TODO: It is LGPL and MIT
111 license = pkgs.lib.licenses.mit;
111 license = pkgs.lib.licenses.mit;
112 };
112 };
113 });
113 });
114
114
115 Pylons = super.Pylons.override (attrs: {
115 Pylons = super.Pylons.override (attrs: {
116 name = "Pylons-1.0.1-patch1";
116 name = "Pylons-1.0.1-patch1";
117 src = pkgs.fetchgit {
117 src = pkgs.fetchgit {
118 url = "https://code.rhodecode.com/upstream/pylons";
118 url = "https://code.rhodecode.com/upstream/pylons";
119 rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
119 rev = "707354ee4261b9c10450404fc9852ccea4fd667d";
120 sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
120 sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e";
121 };
121 };
122 });
122 });
123
123
124 pyramid = super.pyramid.override (attrs: {
124 pyramid = super.pyramid.override (attrs: {
125 postFixup = ''
125 postFixup = ''
126 wrapPythonPrograms
126 wrapPythonPrograms
127 # TODO: johbo: "wrapPython" adds this magic line which
127 # TODO: johbo: "wrapPython" adds this magic line which
128 # confuses pserve.
128 # confuses pserve.
129 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
129 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
130 '';
130 '';
131 meta = {
131 meta = {
132 license = localLicenses.repoze;
132 license = localLicenses.repoze;
133 };
133 };
134 });
134 });
135
135
136 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
137 meta = {
138 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
139 };
140 });
141
136 Pyro4 = super.Pyro4.override (attrs: {
142 Pyro4 = super.Pyro4.override (attrs: {
137 # TODO: Was not able to generate this version, needs further
143 # TODO: Was not able to generate this version, needs further
138 # investigation.
144 # investigation.
139 name = "Pyro4-4.35";
145 name = "Pyro4-4.35";
140 src = pkgs.fetchurl {
146 src = pkgs.fetchurl {
141 url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz";
147 url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz";
142 md5 = "cbe6cb855f086a0f092ca075005855f3";
148 md5 = "cbe6cb855f086a0f092ca075005855f3";
143 };
149 };
144 });
150 });
145
151
146 pysqlite = super.pysqlite.override (attrs: {
152 pysqlite = super.pysqlite.override (attrs: {
147 propagatedBuildInputs = [
153 propagatedBuildInputs = [
148 pkgs.sqlite
154 pkgs.sqlite
149 ];
155 ];
150 meta = {
156 meta = {
151 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
157 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
152 };
158 };
153 });
159 });
154
160
155 pytest-runner = super.pytest-runner.override (attrs: {
161 pytest-runner = super.pytest-runner.override (attrs: {
156 propagatedBuildInputs = [
162 propagatedBuildInputs = [
157 self.setuptools-scm
163 self.setuptools-scm
158 ];
164 ];
159 });
165 });
160
166
161 python-ldap = super.python-ldap.override (attrs: {
167 python-ldap = super.python-ldap.override (attrs: {
162 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
168 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
163 pkgs.cyrus_sasl
169 pkgs.cyrus_sasl
164 pkgs.openldap
170 pkgs.openldap
165 pkgs.openssl
171 pkgs.openssl
166 ];
172 ];
167 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl";
173 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl";
168 });
174 });
169
175
170 python-pam = super.python-pam.override (attrs:
176 python-pam = super.python-pam.override (attrs:
171 let
177 let
172 includeLibPam = pkgs.stdenv.isLinux;
178 includeLibPam = pkgs.stdenv.isLinux;
173 in {
179 in {
174 # TODO: johbo: Move the option up into the default.nix, we should
180 # TODO: johbo: Move the option up into the default.nix, we should
175 # include python-pam only on supported platforms.
181 # include python-pam only on supported platforms.
176 propagatedBuildInputs = attrs.propagatedBuildInputs ++
182 propagatedBuildInputs = attrs.propagatedBuildInputs ++
177 pkgs.lib.optional includeLibPam [
183 pkgs.lib.optional includeLibPam [
178 pkgs.pam
184 pkgs.pam
179 ];
185 ];
180 # TODO: johbo: Check if this can be avoided, or transform into
186 # TODO: johbo: Check if this can be avoided, or transform into
181 # a real patch
187 # a real patch
182 patchPhase = pkgs.lib.optionals includeLibPam ''
188 patchPhase = pkgs.lib.optionals includeLibPam ''
183 substituteInPlace pam.py \
189 substituteInPlace pam.py \
184 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
190 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
185 '';
191 '';
186 });
192 });
187
193
188 rhodecode-tools = super.rhodecode-tools.override (attrs: {
194 rhodecode-tools = super.rhodecode-tools.override (attrs: {
189 patches = [
195 patches = [
190 ./patch-rhodecode-tools-setup.diff
196 ./patch-rhodecode-tools-setup.diff
191 ];
197 ];
192 });
198 });
193
199
194 URLObject = super.URLObject.override (attrs: {
200 URLObject = super.URLObject.override (attrs: {
195 meta = {
201 meta = {
196 license = {
202 license = {
197 spdxId = "Unlicense";
203 spdxId = "Unlicense";
198 fullName = "The Unlicense";
204 fullName = "The Unlicense";
199 url = http://unlicense.org/;
205 url = http://unlicense.org/;
200 };
206 };
201 };
207 };
202 });
208 });
203
209
204 amqplib = super.amqplib.override (attrs: {
210 amqplib = super.amqplib.override (attrs: {
205 meta = {
211 meta = {
206 license = pkgs.lib.licenses.lgpl3;
212 license = pkgs.lib.licenses.lgpl3;
207 };
213 };
208 });
214 });
209
215
210 docutils = super.docutils.override (attrs: {
216 docutils = super.docutils.override (attrs: {
211 meta = {
217 meta = {
212 license = pkgs.lib.licenses.bsd2;
218 license = pkgs.lib.licenses.bsd2;
213 };
219 };
214 });
220 });
215
221
216 colander = super.colander.override (attrs: {
222 colander = super.colander.override (attrs: {
217 meta = {
223 meta = {
218 license = localLicenses.repoze;
224 license = localLicenses.repoze;
219 };
225 };
220 });
226 });
221
227
222 pyramid-beaker = super.pyramid-beaker.override (attrs: {
228 pyramid-beaker = super.pyramid-beaker.override (attrs: {
223 meta = {
229 meta = {
224 license = localLicenses.repoze;
230 license = localLicenses.repoze;
225 };
231 };
226 });
232 });
227
233
228 pyramid-mako = super.pyramid-mako.override (attrs: {
234 pyramid-mako = super.pyramid-mako.override (attrs: {
229 meta = {
235 meta = {
230 license = localLicenses.repoze;
236 license = localLicenses.repoze;
231 };
237 };
232 });
238 });
233
239
234 repoze.lru = super.repoze.lru.override (attrs: {
240 repoze.lru = super.repoze.lru.override (attrs: {
235 meta = {
241 meta = {
236 license = localLicenses.repoze;
242 license = localLicenses.repoze;
237 };
243 };
238 });
244 });
239
245
240 recaptcha-client = super.recaptcha-client.override (attrs: {
246 recaptcha-client = super.recaptcha-client.override (attrs: {
241 meta = {
247 meta = {
242 # TODO: It is MIT/X11
248 # TODO: It is MIT/X11
243 license = pkgs.lib.licenses.mit;
249 license = pkgs.lib.licenses.mit;
244 };
250 };
245 });
251 });
246
252
247 python-editor = super.python-editor.override (attrs: {
253 python-editor = super.python-editor.override (attrs: {
248 meta = {
254 meta = {
249 license = pkgs.lib.licenses.asl20;
255 license = pkgs.lib.licenses.asl20;
250 };
256 };
251 });
257 });
252
258
253 translationstring = super.translationstring.override (attrs: {
259 translationstring = super.translationstring.override (attrs: {
254 meta = {
260 meta = {
255 license = localLicenses.repoze;
261 license = localLicenses.repoze;
256 };
262 };
257 });
263 });
258
264
259 venusian = super.venusian.override (attrs: {
265 venusian = super.venusian.override (attrs: {
260 meta = {
266 meta = {
261 license = localLicenses.repoze;
267 license = localLicenses.repoze;
262 };
268 };
263 });
269 });
264
270
265 # Avoid that setuptools is replaced, this leads to trouble
271 # Avoid that setuptools is replaced, this leads to trouble
266 # with buildPythonPackage.
272 # with buildPythonPackage.
267 setuptools = basePythonPackages.setuptools;
273 setuptools = basePythonPackages.setuptools;
268
274
269 }
275 }
General Comments 0
You need to be logged in to leave comments. Login now