Show More
@@ -1,295 +1,296 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 | # johbo: Interim bridge which allows us to build with the upcoming |
|
18 | # johbo: Interim bridge which allows us to build with the upcoming | |
19 | # nixos.16.09 branch (unstable at the moment of writing this note) and the |
|
19 | # nixos.16.09 branch (unstable at the moment of writing this note) and the | |
20 | # current stable nixos-16.03. |
|
20 | # current stable nixos-16.03. | |
21 | backwardsCompatibleFetchgit = { ... }@args: |
|
21 | backwardsCompatibleFetchgit = { ... }@args: | |
22 | let |
|
22 | let | |
23 | origSources = pkgs.fetchgit args; |
|
23 | origSources = pkgs.fetchgit args; | |
24 | in |
|
24 | in | |
25 | pkgs.lib.overrideDerivation origSources (oldAttrs: { |
|
25 | pkgs.lib.overrideDerivation origSources (oldAttrs: { | |
26 | NIX_PREFETCH_GIT_CHECKOUT_HOOK = '' |
|
26 | NIX_PREFETCH_GIT_CHECKOUT_HOOK = '' | |
27 | find $out -name '.git*' -print0 | xargs -0 rm -rf |
|
27 | find $out -name '.git*' -print0 | xargs -0 rm -rf | |
28 | ''; |
|
28 | ''; | |
29 | }); |
|
29 | }); | |
30 |
|
30 | |||
31 | in |
|
31 | in | |
32 |
|
32 | |||
33 | self: super: { |
|
33 | self: super: { | |
34 |
|
34 | |||
35 | appenlight-client = super.appenlight-client.override (attrs: { |
|
35 | appenlight-client = super.appenlight-client.override (attrs: { | |
36 | meta = { |
|
36 | meta = { | |
37 | license = [ pkgs.lib.licenses.bsdOriginal ]; |
|
37 | license = [ pkgs.lib.licenses.bsdOriginal ]; | |
38 | }; |
|
38 | }; | |
39 | }); |
|
39 | }); | |
40 |
|
40 | |||
41 | future = super.future.override (attrs: { |
|
41 | future = super.future.override (attrs: { | |
42 | meta = { |
|
42 | meta = { | |
43 | license = [ pkgs.lib.licenses.mit ]; |
|
43 | license = [ pkgs.lib.licenses.mit ]; | |
44 | }; |
|
44 | }; | |
45 | }); |
|
45 | }); | |
46 |
|
46 | |||
47 | gnureadline = super.gnureadline.override (attrs: { |
|
47 | gnureadline = super.gnureadline.override (attrs: { | |
48 | buildInputs = attrs.buildInputs ++ [ |
|
48 | buildInputs = attrs.buildInputs ++ [ | |
49 | pkgs.ncurses |
|
49 | pkgs.ncurses | |
50 | ]; |
|
50 | ]; | |
51 | patchPhase = '' |
|
51 | patchPhase = '' | |
52 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" |
|
52 | substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash" | |
53 | ''; |
|
53 | ''; | |
54 | }); |
|
54 | }); | |
55 |
|
55 | |||
56 | gunicorn = super.gunicorn.override (attrs: { |
|
56 | gunicorn = super.gunicorn.override (attrs: { | |
57 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
57 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
58 | # johbo: futures is needed as long as we are on Python 2, otherwise |
|
58 | # johbo: futures is needed as long as we are on Python 2, otherwise | |
59 | # gunicorn explodes if used with multiple threads per worker. |
|
59 | # gunicorn explodes if used with multiple threads per worker. | |
60 | self.futures |
|
60 | self.futures | |
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 | kombu = super.kombu.override (attrs: { |
|
70 | kombu = super.kombu.override (attrs: { | |
71 | # The current version of kombu needs some patching to work with the |
|
71 | # The current version of kombu needs some patching to work with the | |
72 | # other libs. Should be removed once we update celery and kombu. |
|
72 | # other libs. Should be removed once we update celery and kombu. | |
73 | patches = [ |
|
73 | patches = [ | |
74 | ./patch-kombu-py-2-7-11.diff |
|
74 | ./patch-kombu-py-2-7-11.diff | |
75 | ./patch-kombu-msgpack.diff |
|
75 | ./patch-kombu-msgpack.diff | |
76 | ]; |
|
76 | ]; | |
77 | }); |
|
77 | }); | |
78 |
|
78 | |||
79 | lxml = super.lxml.override (attrs: { |
|
79 | lxml = super.lxml.override (attrs: { | |
80 | buildInputs = with self; [ |
|
80 | buildInputs = with self; [ | |
81 | pkgs.libxml2 |
|
81 | pkgs.libxml2 | |
82 | pkgs.libxslt |
|
82 | pkgs.libxslt | |
83 | ]; |
|
83 | ]; | |
84 | }); |
|
84 | }); | |
85 |
|
85 | |||
86 | MySQL-python = super.MySQL-python.override (attrs: { |
|
86 | MySQL-python = super.MySQL-python.override (attrs: { | |
87 | buildInputs = attrs.buildInputs ++ [ |
|
87 | buildInputs = attrs.buildInputs ++ [ | |
88 | pkgs.openssl |
|
88 | pkgs.openssl | |
89 | ]; |
|
89 | ]; | |
90 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
90 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
91 | pkgs.mysql.lib |
|
91 | pkgs.mysql.lib | |
92 | pkgs.zlib |
|
92 | pkgs.zlib | |
93 | ]; |
|
93 | ]; | |
94 | }); |
|
94 | }); | |
95 |
|
95 | |||
96 | psutil = super.psutil.override (attrs: { |
|
96 | psutil = super.psutil.override (attrs: { | |
97 | buildInputs = attrs.buildInputs ++ |
|
97 | buildInputs = attrs.buildInputs ++ | |
98 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; |
|
98 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit; | |
99 | }); |
|
99 | }); | |
100 |
|
100 | |||
101 | psycopg2 = super.psycopg2.override (attrs: { |
|
101 | psycopg2 = super.psycopg2.override (attrs: { | |
102 | buildInputs = attrs.buildInputs ++ |
|
102 | buildInputs = attrs.buildInputs ++ | |
103 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; |
|
103 | pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl; | |
104 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
104 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
105 | pkgs.postgresql |
|
105 | pkgs.postgresql | |
106 | ]; |
|
106 | ]; | |
107 | meta = { |
|
107 | meta = { | |
108 | license = pkgs.lib.licenses.lgpl3Plus; |
|
108 | license = pkgs.lib.licenses.lgpl3Plus; | |
109 | }; |
|
109 | }; | |
110 | }); |
|
110 | }); | |
111 |
|
111 | |||
112 | py-gfm = super.py-gfm.override { |
|
112 | py-gfm = super.py-gfm.override { | |
113 | src = backwardsCompatibleFetchgit { |
|
113 | src = backwardsCompatibleFetchgit { | |
114 | url = "https://code.rhodecode.com/upstream/py-gfm"; |
|
114 | url = "https://code.rhodecode.com/upstream/py-gfm"; | |
115 | rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2"; |
|
115 | rev = "0d66a19bc16e3d49de273c0f797d4e4781e8c0f2"; | |
116 | sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3"; |
|
116 | sha256 = "0ryp74jyihd3ckszq31bml5jr3bciimhfp7va7kw6ld92930ksv3"; | |
117 | }; |
|
117 | }; | |
118 | }; |
|
118 | }; | |
119 |
|
119 | |||
120 | pycurl = super.pycurl.override (attrs: { |
|
120 | pycurl = super.pycurl.override (attrs: { | |
121 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
121 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
122 | pkgs.curl |
|
122 | pkgs.curl | |
123 | pkgs.openssl |
|
123 | pkgs.openssl | |
124 | ]; |
|
124 | ]; | |
125 | preConfigure = '' |
|
125 | preConfigure = '' | |
126 | substituteInPlace setup.py --replace '--static-libs' '--libs' |
|
126 | substituteInPlace setup.py --replace '--static-libs' '--libs' | |
127 | export PYCURL_SSL_LIBRARY=openssl |
|
127 | export PYCURL_SSL_LIBRARY=openssl | |
128 | ''; |
|
128 | ''; | |
129 | meta = { |
|
129 | meta = { | |
130 | # TODO: It is LGPL and MIT |
|
130 | # TODO: It is LGPL and MIT | |
131 | license = pkgs.lib.licenses.mit; |
|
131 | license = pkgs.lib.licenses.mit; | |
132 | }; |
|
132 | }; | |
133 | }); |
|
133 | }); | |
134 |
|
134 | |||
135 | Pylons = super.Pylons.override (attrs: { |
|
135 | Pylons = super.Pylons.override (attrs: { | |
136 | name = "Pylons-1.0.1-patch1"; |
|
136 | name = "Pylons-1.0.1-patch1"; | |
137 | src = backwardsCompatibleFetchgit { |
|
137 | src = backwardsCompatibleFetchgit { | |
138 | url = "https://code.rhodecode.com/upstream/pylons"; |
|
138 | url = "https://code.rhodecode.com/upstream/pylons"; | |
139 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; |
|
139 | rev = "707354ee4261b9c10450404fc9852ccea4fd667d"; | |
140 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; |
|
140 | sha256 = "b2763274c2780523a335f83a1df65be22ebe4ff413a7bc9e9288d23c1f62032e"; | |
141 | }; |
|
141 | }; | |
142 | }); |
|
142 | }); | |
143 |
|
143 | |||
144 | pyramid = super.pyramid.override (attrs: { |
|
144 | pyramid = super.pyramid.override (attrs: { | |
145 | postFixup = '' |
|
145 | postFixup = '' | |
146 | wrapPythonPrograms |
|
146 | wrapPythonPrograms | |
147 | # TODO: johbo: "wrapPython" adds this magic line which |
|
147 | # TODO: johbo: "wrapPython" adds this magic line which | |
148 | # confuses pserve. |
|
148 | # confuses pserve. | |
149 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped |
|
149 | ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped | |
150 | ''; |
|
150 | ''; | |
151 | meta = { |
|
151 | meta = { | |
152 | license = localLicenses.repoze; |
|
152 | license = localLicenses.repoze; | |
153 | }; |
|
153 | }; | |
154 | }); |
|
154 | }); | |
155 |
|
155 | |||
156 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { |
|
156 | pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: { | |
157 | meta = { |
|
157 | meta = { | |
158 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; |
|
158 | license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ]; | |
159 | }; |
|
159 | }; | |
160 | }); |
|
160 | }); | |
161 |
|
161 | |||
162 | Pyro4 = super.Pyro4.override (attrs: { |
|
162 | Pyro4 = super.Pyro4.override (attrs: { | |
163 | # TODO: Was not able to generate this version, needs further |
|
163 | # TODO: Was not able to generate this version, needs further | |
164 | # investigation. |
|
164 | # investigation. | |
165 | name = "Pyro4-4.35"; |
|
165 | name = "Pyro4-4.35"; | |
166 | src = pkgs.fetchurl { |
|
166 | src = pkgs.fetchurl { | |
167 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; |
|
167 | url = "https://pypi.python.org/packages/source/P/Pyro4/Pyro4-4.35.src.tar.gz"; | |
168 | md5 = "cbe6cb855f086a0f092ca075005855f3"; |
|
168 | md5 = "cbe6cb855f086a0f092ca075005855f3"; | |
169 | }; |
|
169 | }; | |
170 | }); |
|
170 | }); | |
171 |
|
171 | |||
172 | pysqlite = super.pysqlite.override (attrs: { |
|
172 | pysqlite = super.pysqlite.override (attrs: { | |
173 | propagatedBuildInputs = [ |
|
173 | propagatedBuildInputs = [ | |
174 | pkgs.sqlite |
|
174 | pkgs.sqlite | |
175 | ]; |
|
175 | ]; | |
176 | meta = { |
|
176 | meta = { | |
177 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; |
|
177 | license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ]; | |
178 | }; |
|
178 | }; | |
179 | }); |
|
179 | }); | |
180 |
|
180 | |||
181 | pytest-runner = super.pytest-runner.override (attrs: { |
|
181 | pytest-runner = super.pytest-runner.override (attrs: { | |
182 | propagatedBuildInputs = [ |
|
182 | propagatedBuildInputs = [ | |
183 | self.setuptools-scm |
|
183 | self.setuptools-scm | |
184 | ]; |
|
184 | ]; | |
185 | }); |
|
185 | }); | |
186 |
|
186 | |||
187 | python-ldap = super.python-ldap.override (attrs: { |
|
187 | python-ldap = super.python-ldap.override (attrs: { | |
188 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ |
|
188 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ [ | |
189 | pkgs.cyrus_sasl |
|
189 | pkgs.cyrus_sasl | |
190 | pkgs.openldap |
|
190 | pkgs.openldap | |
191 | pkgs.openssl |
|
191 | pkgs.openssl | |
192 | ]; |
|
192 | ]; | |
193 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl}/include/sasl"; |
|
193 | # TODO: johbo: Remove the "or" once we drop 16.03 support. | |
|
194 | NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl"; | |||
194 | }); |
|
195 | }); | |
195 |
|
196 | |||
196 | python-pam = super.python-pam.override (attrs: |
|
197 | python-pam = super.python-pam.override (attrs: | |
197 | let |
|
198 | let | |
198 | includeLibPam = pkgs.stdenv.isLinux; |
|
199 | includeLibPam = pkgs.stdenv.isLinux; | |
199 | in { |
|
200 | in { | |
200 | # TODO: johbo: Move the option up into the default.nix, we should |
|
201 | # TODO: johbo: Move the option up into the default.nix, we should | |
201 | # include python-pam only on supported platforms. |
|
202 | # include python-pam only on supported platforms. | |
202 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ |
|
203 | propagatedBuildInputs = attrs.propagatedBuildInputs ++ | |
203 | pkgs.lib.optional includeLibPam [ |
|
204 | pkgs.lib.optional includeLibPam [ | |
204 | pkgs.pam |
|
205 | pkgs.pam | |
205 | ]; |
|
206 | ]; | |
206 | # TODO: johbo: Check if this can be avoided, or transform into |
|
207 | # TODO: johbo: Check if this can be avoided, or transform into | |
207 | # a real patch |
|
208 | # a real patch | |
208 | patchPhase = pkgs.lib.optionals includeLibPam '' |
|
209 | patchPhase = pkgs.lib.optionals includeLibPam '' | |
209 | substituteInPlace pam.py \ |
|
210 | substituteInPlace pam.py \ | |
210 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' |
|
211 | --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"' | |
211 | ''; |
|
212 | ''; | |
212 | }); |
|
213 | }); | |
213 |
|
214 | |||
214 | rhodecode-tools = super.rhodecode-tools.override (attrs: { |
|
215 | rhodecode-tools = super.rhodecode-tools.override (attrs: { | |
215 | patches = [ |
|
216 | patches = [ | |
216 | ./patch-rhodecode-tools-setup.diff |
|
217 | ./patch-rhodecode-tools-setup.diff | |
217 | ]; |
|
218 | ]; | |
218 | }); |
|
219 | }); | |
219 |
|
220 | |||
220 | URLObject = super.URLObject.override (attrs: { |
|
221 | URLObject = super.URLObject.override (attrs: { | |
221 | meta = { |
|
222 | meta = { | |
222 | license = { |
|
223 | license = { | |
223 | spdxId = "Unlicense"; |
|
224 | spdxId = "Unlicense"; | |
224 | fullName = "The Unlicense"; |
|
225 | fullName = "The Unlicense"; | |
225 | url = http://unlicense.org/; |
|
226 | url = http://unlicense.org/; | |
226 | }; |
|
227 | }; | |
227 | }; |
|
228 | }; | |
228 | }); |
|
229 | }); | |
229 |
|
230 | |||
230 | amqplib = super.amqplib.override (attrs: { |
|
231 | amqplib = super.amqplib.override (attrs: { | |
231 | meta = { |
|
232 | meta = { | |
232 | license = pkgs.lib.licenses.lgpl3; |
|
233 | license = pkgs.lib.licenses.lgpl3; | |
233 | }; |
|
234 | }; | |
234 | }); |
|
235 | }); | |
235 |
|
236 | |||
236 | docutils = super.docutils.override (attrs: { |
|
237 | docutils = super.docutils.override (attrs: { | |
237 | meta = { |
|
238 | meta = { | |
238 | license = pkgs.lib.licenses.bsd2; |
|
239 | license = pkgs.lib.licenses.bsd2; | |
239 | }; |
|
240 | }; | |
240 | }); |
|
241 | }); | |
241 |
|
242 | |||
242 | colander = super.colander.override (attrs: { |
|
243 | colander = super.colander.override (attrs: { | |
243 | meta = { |
|
244 | meta = { | |
244 | license = localLicenses.repoze; |
|
245 | license = localLicenses.repoze; | |
245 | }; |
|
246 | }; | |
246 | }); |
|
247 | }); | |
247 |
|
248 | |||
248 | pyramid-beaker = super.pyramid-beaker.override (attrs: { |
|
249 | pyramid-beaker = super.pyramid-beaker.override (attrs: { | |
249 | meta = { |
|
250 | meta = { | |
250 | license = localLicenses.repoze; |
|
251 | license = localLicenses.repoze; | |
251 | }; |
|
252 | }; | |
252 | }); |
|
253 | }); | |
253 |
|
254 | |||
254 | pyramid-mako = super.pyramid-mako.override (attrs: { |
|
255 | pyramid-mako = super.pyramid-mako.override (attrs: { | |
255 | meta = { |
|
256 | meta = { | |
256 | license = localLicenses.repoze; |
|
257 | license = localLicenses.repoze; | |
257 | }; |
|
258 | }; | |
258 | }); |
|
259 | }); | |
259 |
|
260 | |||
260 | repoze.lru = super.repoze.lru.override (attrs: { |
|
261 | repoze.lru = super.repoze.lru.override (attrs: { | |
261 | meta = { |
|
262 | meta = { | |
262 | license = localLicenses.repoze; |
|
263 | license = localLicenses.repoze; | |
263 | }; |
|
264 | }; | |
264 | }); |
|
265 | }); | |
265 |
|
266 | |||
266 | recaptcha-client = super.recaptcha-client.override (attrs: { |
|
267 | recaptcha-client = super.recaptcha-client.override (attrs: { | |
267 | meta = { |
|
268 | meta = { | |
268 | # TODO: It is MIT/X11 |
|
269 | # TODO: It is MIT/X11 | |
269 | license = pkgs.lib.licenses.mit; |
|
270 | license = pkgs.lib.licenses.mit; | |
270 | }; |
|
271 | }; | |
271 | }); |
|
272 | }); | |
272 |
|
273 | |||
273 | python-editor = super.python-editor.override (attrs: { |
|
274 | python-editor = super.python-editor.override (attrs: { | |
274 | meta = { |
|
275 | meta = { | |
275 | license = pkgs.lib.licenses.asl20; |
|
276 | license = pkgs.lib.licenses.asl20; | |
276 | }; |
|
277 | }; | |
277 | }); |
|
278 | }); | |
278 |
|
279 | |||
279 | translationstring = super.translationstring.override (attrs: { |
|
280 | translationstring = super.translationstring.override (attrs: { | |
280 | meta = { |
|
281 | meta = { | |
281 | license = localLicenses.repoze; |
|
282 | license = localLicenses.repoze; | |
282 | }; |
|
283 | }; | |
283 | }); |
|
284 | }); | |
284 |
|
285 | |||
285 | venusian = super.venusian.override (attrs: { |
|
286 | venusian = super.venusian.override (attrs: { | |
286 | meta = { |
|
287 | meta = { | |
287 | license = localLicenses.repoze; |
|
288 | license = localLicenses.repoze; | |
288 | }; |
|
289 | }; | |
289 | }); |
|
290 | }); | |
290 |
|
291 | |||
291 | # Avoid that setuptools is replaced, this leads to trouble |
|
292 | # Avoid that setuptools is replaced, this leads to trouble | |
292 | # with buildPythonPackage. |
|
293 | # with buildPythonPackage. | |
293 | setuptools = basePythonPackages.setuptools; |
|
294 | setuptools = basePythonPackages.setuptools; | |
294 |
|
295 | |||
295 | } |
|
296 | } |
General Comments 0
You need to be logged in to leave comments.
Login now