Show More
@@ -1,251 +1,251 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 |
|
17 | |||
18 | in |
|
18 | in | |
19 |
|
19 | |||
20 | self: super: { |
|
20 | self: super: { | |
21 |
|
21 | |||
22 | appenlight-client = super.appenlight-client.override (attrs: { |
|
22 | appenlight-client = super.appenlight-client.override (attrs: { | |
23 | meta = { |
|
23 | meta = { | |
24 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
24 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
25 | }; |
|
25 | }; | |
26 | }); |
|
26 | }); | |
27 |
|
27 | |||
28 | future = super.future.override (attrs: { |
|
28 | future = super.future.override (attrs: { | |
29 | meta = { |
|
29 | meta = { | |
30 | license = [ pkgs.lib.licenses.mit ]; |
|
30 | license = [ pkgs.lib.licenses.mit ]; | |
31 | }; |
|
31 | }; | |
32 | }); |
|
32 | }); | |
33 |
|
33 | |||
34 | testpath = super.testpath.override (attrs: { |
|
34 | testpath = super.testpath.override (attrs: { | |
35 | meta = { |
|
35 | meta = { | |
36 | license = [ pkgs.lib.licenses.mit ]; |
|
36 | license = [ pkgs.lib.licenses.mit ]; | |
37 | }; |
|
37 | }; | |
38 | }); |
|
38 | }); | |
39 |
|
39 | |||
40 | gnureadline = super.gnureadline.override (attrs: { |
|
40 | gnureadline = super.gnureadline.override (attrs: { | |
41 | buildInputs = attrs.buildInputs ++ [ |
|
41 | buildInputs = attrs.buildInputs ++ [ | |
42 | pkgs.ncurses |
|
42 | pkgs.ncurses | |
43 | ]; |
|
43 | ]; | |
44 | patchPhase = '' |
|
44 | patchPhase = '' | |
45 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
45 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" | |
46 | ''; |
|
46 | ''; | |
47 | }); |
|
47 | }); | |
48 |
|
48 | |||
49 | gunicorn = super.gunicorn.override (attrs: { |
|
49 | gunicorn = super.gunicorn.override (attrs: { | |
50 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
50 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
51 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
51 | # johbo: futures is needed as long as we are on Python 2, otherwise | |
52 | # gunicorn explodes if used with multiple threads per worker. |
|
52 | # gunicorn explodes if used with multiple threads per worker. | |
53 | self.futures |
|
53 | self.futures | |
54 | ]; |
|
54 | ]; | |
55 | }); |
|
55 | }); | |
56 |
|
56 | |||
57 | nbconvert = super.nbconvert.override (attrs: { |
|
57 | nbconvert = super.nbconvert.override (attrs: { | |
58 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
58 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
59 | # marcink: plug in jupyter-client for notebook rendering |
|
59 | # marcink: plug in jupyter-client for notebook rendering | |
60 | self.jupyter-client |
|
60 | self.jupyter-client | |
61 | ]; |
|
61 | ]; | |
62 | }); |
|
62 | }); | |
63 |
|
63 | |||
64 | ipython = super.ipython.override (attrs: { |
|
64 | ipython = super.ipython.override (attrs: { | |
65 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
65 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
66 | self.gnureadline |
|
66 | self.gnureadline | |
67 | ]; |
|
67 | ]; | |
68 | }); |
|
68 | }); | |
69 |
|
69 | |||
70 | lxml = super.lxml.override (attrs: { |
|
70 | lxml = super.lxml.override (attrs: { | |
71 | # johbo: On 16.09 we need this to compile on darwin, otherwise compilation |
|
71 | # johbo: On 16.09 we need this to compile on darwin, otherwise compilation | |
72 | # fails on Darwin. |
|
72 | # fails on Darwin. | |
73 | hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null; |
|
73 | hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null; | |
74 | buildInputs = with self; [ |
|
74 | buildInputs = with self; [ | |
75 | pkgs.libxml2 |
|
75 | pkgs.libxml2 | |
76 | pkgs.libxslt |
|
76 | pkgs.libxslt | |
77 | ]; |
|
77 | ]; | |
78 | }); |
|
78 | }); | |
79 |
|
79 | |||
80 | MySQL-python = super.MySQL-python.override (attrs: { |
|
80 | MySQL-python = super.MySQL-python.override (attrs: { | |
81 | buildInputs = attrs.buildInputs ++ [ |
|
81 | buildInputs = attrs.buildInputs ++ [ | |
82 | pkgs.openssl |
|
82 | pkgs.openssl | |
83 | ]; |
|
83 | ]; | |
84 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
84 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
85 |
pkgs.mysql |
|
85 | pkgs.libmysql | |
86 | pkgs.zlib |
|
86 | pkgs.zlib | |
87 | ]; |
|
87 | ]; | |
88 | }); |
|
88 | }); | |
89 |
|
89 | |||
90 | psutil = super.psutil.override (attrs: { |
|
90 | psutil = super.psutil.override (attrs: { | |
91 | buildInputs = attrs.buildInputs ++ |
|
91 | buildInputs = attrs.buildInputs ++ | |
92 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
92 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; | |
93 | }); |
|
93 | }); | |
94 |
|
94 | |||
95 | psycopg2 = super.psycopg2.override (attrs: { |
|
95 | psycopg2 = super.psycopg2.override (attrs: { | |
96 | buildInputs = attrs.buildInputs ++ |
|
96 | buildInputs = attrs.buildInputs ++ | |
97 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
97 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; | |
98 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
98 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
99 | pkgs.postgresql |
|
99 | pkgs.postgresql | |
100 | ]; |
|
100 | ]; | |
101 | meta = { |
|
101 | meta = { | |
102 | license = pkgs.lib.licenses.lgpl3Plus; |
|
102 | license = pkgs.lib.licenses.lgpl3Plus; | |
103 | }; |
|
103 | }; | |
104 | }); |
|
104 | }); | |
105 |
|
105 | |||
106 | pycurl = super.pycurl.override (attrs: { |
|
106 | pycurl = super.pycurl.override (attrs: { | |
107 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
107 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
108 | pkgs.curl |
|
108 | pkgs.curl | |
109 | pkgs.openssl |
|
109 | pkgs.openssl | |
110 | ]; |
|
110 | ]; | |
111 | preConfigure = '' |
|
111 | preConfigure = '' | |
112 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
112 | substituteInPlace setup.py --replace '--static-libs' '--libs' | |
113 | export PYCURL_SSL_LIBRARY=openssl |
|
113 | export PYCURL_SSL_LIBRARY=openssl | |
114 | ''; |
|
114 | ''; | |
115 | meta = { |
|
115 | meta = { | |
116 | # TODO: It is LGPL and MIT |
|
116 | # TODO: It is LGPL and MIT | |
117 | license = pkgs.lib.licenses.mit; |
|
117 | license = pkgs.lib.licenses.mit; | |
118 | }; |
|
118 | }; | |
119 | }); |
|
119 | }); | |
120 |
|
120 | |||
121 | pyramid = super.pyramid.override (attrs: { |
|
121 | pyramid = super.pyramid.override (attrs: { | |
122 | postFixup = '' |
|
122 | postFixup = '' | |
123 | wrapPythonPrograms |
|
123 | wrapPythonPrograms | |
124 | # TODO: johbo: "wrapPython" adds this magic line which |
|
124 | # TODO: johbo: "wrapPython" adds this magic line which | |
125 | # confuses pserve. |
|
125 | # confuses pserve. | |
126 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
126 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped | |
127 | ''; |
|
127 | ''; | |
128 | meta = { |
|
128 | meta = { | |
129 | license = localLicenses.repoze; |
|
129 | license = localLicenses.repoze; | |
130 | }; |
|
130 | }; | |
131 | }); |
|
131 | }); | |
132 |
|
132 | |||
133 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { |
|
133 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { | |
134 | meta = { |
|
134 | meta = { | |
135 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; |
|
135 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; | |
136 | }; |
|
136 | }; | |
137 | }); |
|
137 | }); | |
138 |
|
138 | |||
139 | pysqlite = super.pysqlite.override (attrs: { |
|
139 | pysqlite = super.pysqlite.override (attrs: { | |
140 | propagatedBuildInputs = [ |
|
140 | propagatedBuildInputs = [ | |
141 | pkgs.sqlite |
|
141 | pkgs.sqlite | |
142 | ]; |
|
142 | ]; | |
143 | meta = { |
|
143 | meta = { | |
144 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; |
|
144 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; | |
145 | }; |
|
145 | }; | |
146 | }); |
|
146 | }); | |
147 |
|
147 | |||
148 | pytest-runner = super.pytest-runner.override (attrs: { |
|
148 | pytest-runner = super.pytest-runner.override (attrs: { | |
149 | propagatedBuildInputs = [ |
|
149 | propagatedBuildInputs = [ | |
150 | self.setuptools-scm |
|
150 | self.setuptools-scm | |
151 | ]; |
|
151 | ]; | |
152 | }); |
|
152 | }); | |
153 |
|
153 | |||
154 | python-ldap = super.python-ldap.override (attrs: { |
|
154 | python-ldap = super.python-ldap.override (attrs: { | |
155 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
155 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
156 | pkgs.cyrus_sasl |
|
156 | pkgs.cyrus_sasl | |
157 | pkgs.openldap |
|
157 | pkgs.openldap | |
158 | pkgs.openssl |
|
158 | pkgs.openssl | |
159 | ]; |
|
159 | ]; | |
160 | # TODO: johbo: Remove the "or" once we drop 16.03 support. |
|
160 | # TODO: johbo: Remove the "or" once we drop 16.03 support. | |
161 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl"; |
|
161 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl"; | |
162 | }); |
|
162 | }); | |
163 |
|
163 | |||
164 | python-pam = super.python-pam.override (attrs: |
|
164 | python-pam = super.python-pam.override (attrs: | |
165 | let |
|
165 | let | |
166 | includeLibPam = pkgs.stdenv.isLinux; |
|
166 | includeLibPam = pkgs.stdenv.isLinux; | |
167 | in { |
|
167 | in { | |
168 | # TODO: johbo: Move the option up into the default.nix, we should |
|
168 | # TODO: johbo: Move the option up into the default.nix, we should | |
169 | # include python-pam only on supported platforms. |
|
169 | # include python-pam only on supported platforms. | |
170 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
170 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ | |
171 | pkgs.lib.optional includeLibPam [ |
|
171 | pkgs.lib.optional includeLibPam [ | |
172 | pkgs.pam |
|
172 | pkgs.pam | |
173 | ]; |
|
173 | ]; | |
174 | # TODO: johbo: Check if this can be avoided, or transform into |
|
174 | # TODO: johbo: Check if this can be avoided, or transform into | |
175 | # a real patch |
|
175 | # a real patch | |
176 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
176 | patchPhase = pkgs.lib.optionals includeLibPam '' | |
177 | substituteInPlace pam.py \ |
|
177 | substituteInPlace pam.py \ | |
178 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
178 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' | |
179 | ''; |
|
179 | ''; | |
180 | }); |
|
180 | }); | |
181 |
|
181 | |||
182 | URLObject = super.URLObject.override (attrs: { |
|
182 | URLObject = super.URLObject.override (attrs: { | |
183 | meta = { |
|
183 | meta = { | |
184 | license = { |
|
184 | license = { | |
185 | spdxId = "Unlicense"; |
|
185 | spdxId = "Unlicense"; | |
186 | fullName = "The Unlicense"; |
|
186 | fullName = "The Unlicense"; | |
187 | url = http://unlicense.org/; |
|
187 | url = http://unlicense.org/; | |
188 | }; |
|
188 | }; | |
189 | }; |
|
189 | }; | |
190 | }); |
|
190 | }); | |
191 |
|
191 | |||
192 | docutils = super.docutils.override (attrs: { |
|
192 | docutils = super.docutils.override (attrs: { | |
193 | meta = { |
|
193 | meta = { | |
194 | license = pkgs.lib.licenses.bsd2; |
|
194 | license = pkgs.lib.licenses.bsd2; | |
195 | }; |
|
195 | }; | |
196 | }); |
|
196 | }); | |
197 |
|
197 | |||
198 | colander = super.colander.override (attrs: { |
|
198 | colander = super.colander.override (attrs: { | |
199 | meta = { |
|
199 | meta = { | |
200 | license = localLicenses.repoze; |
|
200 | license = localLicenses.repoze; | |
201 | }; |
|
201 | }; | |
202 | }); |
|
202 | }); | |
203 |
|
203 | |||
204 | pyramid-beaker = super.pyramid-beaker.override (attrs: { |
|
204 | pyramid-beaker = super.pyramid-beaker.override (attrs: { | |
205 | meta = { |
|
205 | meta = { | |
206 | license = localLicenses.repoze; |
|
206 | license = localLicenses.repoze; | |
207 | }; |
|
207 | }; | |
208 | }); |
|
208 | }); | |
209 |
|
209 | |||
210 | pyramid-mako = super.pyramid-mako.override (attrs: { |
|
210 | pyramid-mako = super.pyramid-mako.override (attrs: { | |
211 | meta = { |
|
211 | meta = { | |
212 | license = localLicenses.repoze; |
|
212 | license = localLicenses.repoze; | |
213 | }; |
|
213 | }; | |
214 | }); |
|
214 | }); | |
215 |
|
215 | |||
216 | repoze.lru = super.repoze.lru.override (attrs: { |
|
216 | repoze.lru = super.repoze.lru.override (attrs: { | |
217 | meta = { |
|
217 | meta = { | |
218 | license = localLicenses.repoze; |
|
218 | license = localLicenses.repoze; | |
219 | }; |
|
219 | }; | |
220 | }); |
|
220 | }); | |
221 |
|
221 | |||
222 | recaptcha-client = super.recaptcha-client.override (attrs: { |
|
222 | recaptcha-client = super.recaptcha-client.override (attrs: { | |
223 | meta = { |
|
223 | meta = { | |
224 | # TODO: It is MIT/X11 |
|
224 | # TODO: It is MIT/X11 | |
225 | license = pkgs.lib.licenses.mit; |
|
225 | license = pkgs.lib.licenses.mit; | |
226 | }; |
|
226 | }; | |
227 | }); |
|
227 | }); | |
228 |
|
228 | |||
229 | python-editor = super.python-editor.override (attrs: { |
|
229 | python-editor = super.python-editor.override (attrs: { | |
230 | meta = { |
|
230 | meta = { | |
231 | license = pkgs.lib.licenses.asl20; |
|
231 | license = pkgs.lib.licenses.asl20; | |
232 | }; |
|
232 | }; | |
233 | }); |
|
233 | }); | |
234 |
|
234 | |||
235 | translationstring = super.translationstring.override (attrs: { |
|
235 | translationstring = super.translationstring.override (attrs: { | |
236 | meta = { |
|
236 | meta = { | |
237 | license = localLicenses.repoze; |
|
237 | license = localLicenses.repoze; | |
238 | }; |
|
238 | }; | |
239 | }); |
|
239 | }); | |
240 |
|
240 | |||
241 | venusian = super.venusian.override (attrs: { |
|
241 | venusian = super.venusian.override (attrs: { | |
242 | meta = { |
|
242 | meta = { | |
243 | license = localLicenses.repoze; |
|
243 | license = localLicenses.repoze; | |
244 | }; |
|
244 | }; | |
245 | }); |
|
245 | }); | |
246 |
|
246 | |||
247 | # Avoid that setuptools is replaced, this leads to trouble |
|
247 | # Avoid that setuptools is replaced, this leads to trouble | |
248 | # with buildPythonPackage. |
|
248 | # with buildPythonPackage. | |
249 | setuptools = basePythonPackages.setuptools; |
|
249 | setuptools = basePythonPackages.setuptools; | |
250 |
|
250 | |||
251 | } |
|
251 | } |
General Comments 0
You need to be logged in to leave comments.
Login now