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