##// END OF EJS Templates
nix: use common structure of patches for python libraries
marcink -
r3138:e7d48731 default
parent child Browse files
Show More
1 NO CONTENT: file renamed from pkgs/patch_beaker/patch-beaker-lock-func-debug.diff to pkgs/patches/beaker/patch-beaker-lock-func-debug.diff
NO CONTENT: file renamed from pkgs/patch_beaker/patch-beaker-lock-func-debug.diff to pkgs/patches/beaker/patch-beaker-lock-func-debug.diff
1 NO CONTENT: file renamed from pkgs/patch_beaker/patch-beaker-metadata-reuse.diff to pkgs/patches/beaker/patch-beaker-metadata-reuse.diff
NO CONTENT: file renamed from pkgs/patch_beaker/patch-beaker-metadata-reuse.diff to pkgs/patches/beaker/patch-beaker-metadata-reuse.diff
@@ -1,247 +1,247 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
7 { pkgs
8 , basePythonPackages
8 , basePythonPackages
9 }:
9 }:
10
10
11 let
11 let
12 sed = "sed -i";
12 sed = "sed -i";
13
13
14 localLicenses = {
14 localLicenses = {
15 repoze = {
15 repoze = {
16 fullName = "Repoze License";
16 fullName = "Repoze License";
17 url = http://www.repoze.org/LICENSE.txt;
17 url = http://www.repoze.org/LICENSE.txt;
18 };
18 };
19 };
19 };
20
20
21 in
21 in
22
22
23 self: super: {
23 self: super: {
24
24
25 "appenlight-client" = super."appenlight-client".override (attrs: {
25 "appenlight-client" = super."appenlight-client".override (attrs: {
26 meta = {
26 meta = {
27 license = [ pkgs.lib.licenses.bsdOriginal ];
27 license = [ pkgs.lib.licenses.bsdOriginal ];
28 };
28 };
29 });
29 });
30
30
31 "beaker" = super."beaker".override (attrs: {
31 "beaker" = super."beaker".override (attrs: {
32 patches = [
32 patches = [
33 ./patch_beaker/patch-beaker-lock-func-debug.diff
33 ./patches/beaker/patch-beaker-lock-func-debug.diff
34 ./patch_beaker/patch-beaker-metadata-reuse.diff
34 ./patches/beaker/patch-beaker-metadata-reuse.diff
35 ];
35 ];
36 });
36 });
37
37
38 "gevent" = super."gevent".override (attrs: {
38 "gevent" = super."gevent".override (attrs: {
39 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
39 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
40 # NOTE: (marcink) odd requirements from gevent aren't set properly,
40 # NOTE: (marcink) odd requirements from gevent aren't set properly,
41 # thus we need to inject psutil manually
41 # thus we need to inject psutil manually
42 self."psutil"
42 self."psutil"
43 ];
43 ];
44 });
44 });
45
45
46 "future" = super."future".override (attrs: {
46 "future" = super."future".override (attrs: {
47 meta = {
47 meta = {
48 license = [ pkgs.lib.licenses.mit ];
48 license = [ pkgs.lib.licenses.mit ];
49 };
49 };
50 });
50 });
51
51
52 "testpath" = super."testpath".override (attrs: {
52 "testpath" = super."testpath".override (attrs: {
53 meta = {
53 meta = {
54 license = [ pkgs.lib.licenses.mit ];
54 license = [ pkgs.lib.licenses.mit ];
55 };
55 };
56 });
56 });
57
57
58 "gnureadline" = super."gnureadline".override (attrs: {
58 "gnureadline" = super."gnureadline".override (attrs: {
59 buildInputs = [
59 buildInputs = [
60 pkgs.ncurses
60 pkgs.ncurses
61 ];
61 ];
62 patchPhase = ''
62 patchPhase = ''
63 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
63 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
64 '';
64 '';
65 });
65 });
66
66
67 "gunicorn" = super."gunicorn".override (attrs: {
67 "gunicorn" = super."gunicorn".override (attrs: {
68 propagatedBuildInputs = [
68 propagatedBuildInputs = [
69 # johbo: futures is needed as long as we are on Python 2, otherwise
69 # johbo: futures is needed as long as we are on Python 2, otherwise
70 # gunicorn explodes if used with multiple threads per worker.
70 # gunicorn explodes if used with multiple threads per worker.
71 self."futures"
71 self."futures"
72 ];
72 ];
73 });
73 });
74
74
75 "nbconvert" = super."nbconvert".override (attrs: {
75 "nbconvert" = super."nbconvert".override (attrs: {
76 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
76 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
77 # marcink: plug in jupyter-client for notebook rendering
77 # marcink: plug in jupyter-client for notebook rendering
78 self."jupyter-client"
78 self."jupyter-client"
79 ];
79 ];
80 });
80 });
81
81
82 "ipython" = super."ipython".override (attrs: {
82 "ipython" = super."ipython".override (attrs: {
83 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
83 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
84 self."gnureadline"
84 self."gnureadline"
85 ];
85 ];
86 });
86 });
87
87
88 "lxml" = super."lxml".override (attrs: {
88 "lxml" = super."lxml".override (attrs: {
89 buildInputs = [
89 buildInputs = [
90 pkgs.libxml2
90 pkgs.libxml2
91 pkgs.libxslt
91 pkgs.libxslt
92 ];
92 ];
93 propagatedBuildInputs = [
93 propagatedBuildInputs = [
94 # Needed, so that "setup.py bdist_wheel" does work
94 # Needed, so that "setup.py bdist_wheel" does work
95 self."wheel"
95 self."wheel"
96 ];
96 ];
97 });
97 });
98
98
99 "mysql-python" = super."mysql-python".override (attrs: {
99 "mysql-python" = super."mysql-python".override (attrs: {
100 buildInputs = [
100 buildInputs = [
101 pkgs.openssl
101 pkgs.openssl
102 ];
102 ];
103 propagatedBuildInputs = [
103 propagatedBuildInputs = [
104 pkgs.libmysql
104 pkgs.libmysql
105 pkgs.zlib
105 pkgs.zlib
106 ];
106 ];
107 });
107 });
108
108
109 "psycopg2" = super."psycopg2".override (attrs: {
109 "psycopg2" = super."psycopg2".override (attrs: {
110 propagatedBuildInputs = [
110 propagatedBuildInputs = [
111 pkgs.postgresql
111 pkgs.postgresql
112 ];
112 ];
113 meta = {
113 meta = {
114 license = pkgs.lib.licenses.lgpl3Plus;
114 license = pkgs.lib.licenses.lgpl3Plus;
115 };
115 };
116 });
116 });
117
117
118 "pycurl" = super."pycurl".override (attrs: {
118 "pycurl" = super."pycurl".override (attrs: {
119 propagatedBuildInputs = [
119 propagatedBuildInputs = [
120 pkgs.curl
120 pkgs.curl
121 pkgs.openssl
121 pkgs.openssl
122 ];
122 ];
123 preConfigure = ''
123 preConfigure = ''
124 substituteInPlace setup.py --replace '--static-libs' '--libs'
124 substituteInPlace setup.py --replace '--static-libs' '--libs'
125 export PYCURL_SSL_LIBRARY=openssl
125 export PYCURL_SSL_LIBRARY=openssl
126 '';
126 '';
127 meta = {
127 meta = {
128 license = pkgs.lib.licenses.mit;
128 license = pkgs.lib.licenses.mit;
129 };
129 };
130 });
130 });
131
131
132 "pyramid" = super."pyramid".override (attrs: {
132 "pyramid" = super."pyramid".override (attrs: {
133 meta = {
133 meta = {
134 license = localLicenses.repoze;
134 license = localLicenses.repoze;
135 };
135 };
136 });
136 });
137
137
138 "pyramid-debugtoolbar" = super."pyramid-debugtoolbar".override (attrs: {
138 "pyramid-debugtoolbar" = super."pyramid-debugtoolbar".override (attrs: {
139 meta = {
139 meta = {
140 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
140 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
141 };
141 };
142 });
142 });
143
143
144 "pysqlite" = super."pysqlite".override (attrs: {
144 "pysqlite" = super."pysqlite".override (attrs: {
145 propagatedBuildInputs = [
145 propagatedBuildInputs = [
146 pkgs.sqlite
146 pkgs.sqlite
147 ];
147 ];
148 meta = {
148 meta = {
149 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
149 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
150 };
150 };
151 });
151 });
152
152
153 "pytest-runner" = super."pytest-runner".override (attrs: {
153 "pytest-runner" = super."pytest-runner".override (attrs: {
154 propagatedBuildInputs = [
154 propagatedBuildInputs = [
155 self."setuptools-scm"
155 self."setuptools-scm"
156 ];
156 ];
157 });
157 });
158
158
159 "python-ldap" = super."python-ldap".override (attrs: {
159 "python-ldap" = super."python-ldap".override (attrs: {
160 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
160 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
161 pkgs.openldap
161 pkgs.openldap
162 pkgs.cyrus_sasl
162 pkgs.cyrus_sasl
163 pkgs.openssl
163 pkgs.openssl
164 ];
164 ];
165 });
165 });
166
166
167 "python-pam" = super."python-pam".override (attrs: {
167 "python-pam" = super."python-pam".override (attrs: {
168 propagatedBuildInputs = [
168 propagatedBuildInputs = [
169 pkgs.pam
169 pkgs.pam
170 ];
170 ];
171 # TODO: johbo: Check if this can be avoided, or transform into
171 # TODO: johbo: Check if this can be avoided, or transform into
172 # a real patch
172 # a real patch
173 patchPhase = ''
173 patchPhase = ''
174 substituteInPlace pam.py \
174 substituteInPlace pam.py \
175 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
175 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
176 '';
176 '';
177 });
177 });
178
178
179 "pyzmq" = super."pyzmq".override (attrs: {
179 "pyzmq" = super."pyzmq".override (attrs: {
180 buildInputs = [
180 buildInputs = [
181 pkgs.czmq
181 pkgs.czmq
182 ];
182 ];
183 });
183 });
184
184
185 "urlobject" = super."urlobject".override (attrs: {
185 "urlobject" = super."urlobject".override (attrs: {
186 meta = {
186 meta = {
187 license = {
187 license = {
188 spdxId = "Unlicense";
188 spdxId = "Unlicense";
189 fullName = "The Unlicense";
189 fullName = "The Unlicense";
190 url = http://unlicense.org/;
190 url = http://unlicense.org/;
191 };
191 };
192 };
192 };
193 });
193 });
194
194
195 "docutils" = super."docutils".override (attrs: {
195 "docutils" = super."docutils".override (attrs: {
196 meta = {
196 meta = {
197 license = pkgs.lib.licenses.bsd2;
197 license = pkgs.lib.licenses.bsd2;
198 };
198 };
199 });
199 });
200
200
201 "colander" = super."colander".override (attrs: {
201 "colander" = super."colander".override (attrs: {
202 meta = {
202 meta = {
203 license = localLicenses.repoze;
203 license = localLicenses.repoze;
204 };
204 };
205 });
205 });
206
206
207 "pyramid-beaker" = super."pyramid-beaker".override (attrs: {
207 "pyramid-beaker" = super."pyramid-beaker".override (attrs: {
208 meta = {
208 meta = {
209 license = localLicenses.repoze;
209 license = localLicenses.repoze;
210 };
210 };
211 });
211 });
212
212
213 "pyramid-mako" = super."pyramid-mako".override (attrs: {
213 "pyramid-mako" = super."pyramid-mako".override (attrs: {
214 meta = {
214 meta = {
215 license = localLicenses.repoze;
215 license = localLicenses.repoze;
216 };
216 };
217 });
217 });
218
218
219 "repoze.lru" = super."repoze.lru".override (attrs: {
219 "repoze.lru" = super."repoze.lru".override (attrs: {
220 meta = {
220 meta = {
221 license = localLicenses.repoze;
221 license = localLicenses.repoze;
222 };
222 };
223 });
223 });
224
224
225 "python-editor" = super."python-editor".override (attrs: {
225 "python-editor" = super."python-editor".override (attrs: {
226 meta = {
226 meta = {
227 license = pkgs.lib.licenses.asl20;
227 license = pkgs.lib.licenses.asl20;
228 };
228 };
229 });
229 });
230
230
231 "translationstring" = super."translationstring".override (attrs: {
231 "translationstring" = super."translationstring".override (attrs: {
232 meta = {
232 meta = {
233 license = localLicenses.repoze;
233 license = localLicenses.repoze;
234 };
234 };
235 });
235 });
236
236
237 "venusian" = super."venusian".override (attrs: {
237 "venusian" = super."venusian".override (attrs: {
238 meta = {
238 meta = {
239 license = localLicenses.repoze;
239 license = localLicenses.repoze;
240 };
240 };
241 });
241 });
242
242
243 # Avoid that base packages screw up the build process
243 # Avoid that base packages screw up the build process
244 inherit (basePythonPackages)
244 inherit (basePythonPackages)
245 setuptools;
245 setuptools;
246
246
247 }
247 }
General Comments 0
You need to be logged in to leave comments. Login now